Linux keeps your computer incredibly organized. When you install software on Ubuntu, the package manager carefully tracks every single file and dependency it places on your hard drive. This means when you are ready to remove a program, you can rip it out completely without leaving behind the messy registry errors and broken shortcuts common on Windows.
Depending on how you installed the software (via the GUI or the terminal), the removal process is slightly different. Here is how to uninstall a program in Ubuntu using both methods.
Method 1: Using the Ubuntu Software Center (GUI Method)
If you are using the desktop version of Ubuntu and you originally installed the app through the graphical store, removing it is just as easy.
- Click on the orange suitcase icon (Ubuntu Software) in your dock to open the software center.
- At the very top of the window, click on the Installed tab.
- You will see an alphabetical list of every graphical application currently installed on your computer.
- Scroll down until you find the program you want to remove (e.g., VLC Media Player).
- Click the grey Uninstall or Remove button next to its name.
- A pop-up will ask, “Are you sure you want to uninstall?” Click Uninstall again to confirm.
- Type your administrator password when prompted.
The system will handle the rest in the background, and the app’s icon will instantly vanish from your application launcher.
Method 2: Using the apt Package Manager (Terminal Method)
If you are managing a headless Ubuntu server, or if you prefer the speed of the command line, you must use the apt package manager. This is the most powerful and thorough way to remove software.
- Open your terminal (Ctrl + Alt + T).
- If you do not remember the exact name of the package you want to delete, you can search for it by typing:
apt list --installed | grep "name_of_program" - Once you know the exact package name (for example,
apache2), type the following command:
sudo apt remove apache2 - Press Enter. The system will calculate how much disk space will be freed and ask you to confirm. Type Y and press Enter.
The Purge Command: The standard remove command deletes the application files but leaves its customized configuration files behind (just in case you ever reinstall it). If you want to absolutely obliterate the program and all its configuration files, use the purge command instead:
sudo apt purge apache2
Step 3: Clean Up Orphaned Dependencies
When you installed that program, Ubuntu likely downloaded five other background programs (dependencies) to make it work. Now that the main program is gone, those dependencies are just wasting space.
To safely delete any orphaned packages that are no longer needed by any software on your system, run this command:
sudo apt autoremove
This will keep your Ubuntu system lean and fast.