Safely remove programs and packages from your Ubuntu system
Need to remove a program you've installed on your Ubuntu system? You have several options, and they are all very easy. This tutorial will teach you how to remove software packages from Ubuntu Linux from the terminal using apt or apt-get , through a GUI using App Center, removing snaps and Flatpacks, and many more options. We'll also show you how to clean up unneeded configuration files and orphaned dependencies for a complete uninstall.
Uninstalling an Application in Ubuntu Linux
- To uninstall an application in the terminal, use sudo apt remove <package_name> .
- To see a list of installed packages, type dpkg -l and press Enter.
- To use a GUI to uninstall software, open App Center , click Installed to see installed software, select a program to uninstall, and click Remove .
- You can also uninstall snaps and Flatpak packages from the terminal.
Steps
-
Press Ctrl + Alt + T to open a Terminal window. Alternatively, you can open a Terminal by searching for it in Activities view. [1] X Research source
-
View a list of installed packages. To uninstall a program, you will need to find the name of the package. To see a list of all installed DEB packages , type dpkg -l into Terminal, then press ↵ Enter . [2] X Research source
- If you are looking for a specific package, you can use grep to search the results of the package list. For example, if you're looking for bind, use dpkg -i | grep bind to find all packages containing that string.
- Another option is to use sudo apt list .
- If you want to see which files are in the package you'll be removing, use the command dpkg -L packagename .
Advertisement -
3Use sudo apt remove packagename to uninstall. This command will uninstall the software but keep the configuration files in case you want to reinstall. For example, if you want to uninstall LibreOffice, you'd type sudo apt remove libreoffice and press Enter .
- If you want to get rid of the configuration files as well, use sudo apt purge packagename instead. [3] X Research source
- When prompted, press y and then ↵ Enter to confirm.
- To clean up the cache and remove any unneeded dependencies post-uninstall, use sudo apt clean && sudo apt autoremove .
Advertisement
-
1Open the App Center. If you want to uninstall a graphical program, whether installed from a DEB or Snap package, you can use the App Center in Ubuntu. To open it, click the App Center in the dock, or search for it in Activities view. [4] X Research source
- If another application on the system requires the application you are uninstalling, both applications will be removed.
-
2Click Installed at the top. This displays all installed applications you can remove with App Center.
-
3Select an application and click Remove . When prompted, enter your password to confirm. This uninstalls the selected application from Ubuntu.
Advertisement
-
Press Ctrl + Alt + T to open a Terminal window. Alternatively, you can open a Terminal by searching for it in Activities view. [5] X Research source
-
2View the list of installed snaps. To uninstall a snap, you will need to find the name of the package. You can do so easily in a Terminal by typing snap list and pressing ↵ Enter .
- If you have a lot of snaps installed, you can search for a specific program using grep. For example, to find the Firefox snap, you'd use snap list .
- Snaps with green checkmarks were created by verified developers. [6] X Research source
-
3Use sudo snap remove package_name to uninstall the snap. Enter your password when prompted, and the snap will be uninstalled from Ubuntu.
Advertisement
-
Press Ctrl + Alt + T to open a terminal window. Alternatively, you can open a Terminal by searching for it in Activities view. [7] X Research source
-
2Find the Flatpak you want to uninstall. To list both applications and runtimes you've installed, type flatpak list and press ↵ Enter . If you only want to see installed applications, type flatpak list --app and press ↵ Enter |. [8] X Research source
- Search for a specific program using flatpak list | grep name .
-
3Use flatpak uninstall program_name to uninstall. This will uninstall the program but leave the associated data in ~/.var/app/ in case you ever want to install it again.
- If you want to remove the associated app data as well, use flatpak uninstall --delete-data program_name . [9] X Research source
- For example, if you want to uninstall GIMP and all associated user data, use flatpak uninstall --delete-data org.gimp.GIMP .
- If you want to remove runtimes and extensions that aren't being used by other programs, use flatpak uninstall --unused . [10] X Research source
Advertisement
-
1Open Synaptic. If you want to uninstall a package in Ubuntu, you can use Synaptic. Type synaptic into Activities view to get started–you will be prompted to enter your password to open the package manager. [11] X Research source
-
2Click Status to view installed packages. You will see this option in the left panel.
-
3Right-click a package and select Mark for Removal . Repeat this for each piece of software you want to uninstall. [12] X Research source
- This will only remove the selected program(s) and not the associated user data. If you also want to delete user data, select Mark for Complete Removal instead.
-
4Click Apply to uninstall the selected software. Alternatively, you can use the keyboard shortcut Ctrl + P . This deletes the selected programs from Ubuntu Linux.
Advertisement
-
Open Ubuntu Software. If you're using an older version of Ubuntu (before Ubuntu 16.04), you can uninstall software using Ubuntu Software. Type ubuntu software into Activities view to find it.
-
Click the Installed tab. This tab is at the top of the Ubuntu Software window.
-
Find the program that you want to uninstall. Scroll through the list of installed programs until you arrive at the one that you want to uninstall, or type the name of an installed program into the search bar in the top-right corner of the window.
-
Click Remove on a program to uninstall it. It's to the right of the program that you want to uninstall. [13] X Research source
- If asked to confirm, click Remove again, or click OK .
Advertisement
-
Press Ctrl + Alt + T to open a Terminal window. Alternatively, you can open the Terminal by searching for it in Activities view. [14] X Research source
- You can use this method if you want to uninstall a DEB package you installed using any method.
- This method will only uninstall the package and not any dependencies. If you also want to remove the dependencies, use Apt instead.
-
View a list of installed packages. To uninstall a program, you will need to find the name of the package. To see a list of all installed DEB packages, type dpkg -l into Terminal, then press ↵ Enter . [15] X Research source
- If you are looking for a specific package, you can search the results. For example, if you're looking for GIMP, use dpkg -i | grep gimp to find all packages containing that string.
- If you want to see which files are in the package you'll be removing, use the command dpkg -L packagename .
-
3Uninstall the package. To do so, type dpkg -r package_name and press ↵ Enter . The software is now removed from Ubuntu.
Advertisement
-
Press Ctrl + Alt + T to open a terminal window. Alternatively, you can open a Terminal by searching for it in Activities view. [16] X Research source
- Use this method to uninstall orphaned packages, which are packages that were automatically installed as dependencies while installing other software but are no longer needed.
- This method will also remove old kernels–all except the one you're currently using.
-
2Delete the unneeded dependencies. To do this, type sudo apt autoremove and press ↵ Enter . After you enter your password to confirm, Apt will look for and remove any dependencies that aren't required by software on your computer.
-
3Delete leftover configuration files (optional). If you uninstalled packages without purging their configuration files, you can purge all leftover configuration files at once with this command:
- dpkg -l | grep "^rc" | awk '{print $2}' | sudo xargs dpkg -P
Advertisement
-
Press Ctrl + Alt + T to open a terminal window. If you added a repository to install software on Ubuntu, you can use this method to uninstall all software you installed from that repository, as well as remove the repository itself.
- If you installed a nightly build of software that came with Ubuntu, like VLC, the original version will be restored. [17] X Research source
-
2Find the repository name. If you don't remember it, you can see which repository you installed software from using the command apt policy package_name .
-
3Use the ppa-purge command to remove the repository and its packages. This command will remove the repository and uninstall any packages you installed from it. If earlier versions of the software came with Ubuntu, the software will be reverted to those versions. The syntax for the command is sudo ppa-purge ppa:repositoryname/
- For example, if you installed Firefox and want to remove the Mozilla repository and uninstall the version of Firefox you got from it, you would use sudo ppa-purge ppa:mozillateam/ppa .
Advertisement
Community Q&A
Search
-
QuestionCan I remove an operating system that l run?Community AnswerYou can wipe your hard drive or you can install another OS on the same disk. During the installation wizard, remove the other OS (see the respective manual online).
-
QuestionCan I uninstall Ubuntu and install Windows without a CD?SomoneCommunity AnswerYou may be able to use a USB pen drive.
-
QuestionHow do I uninstall Skype?Community AnswerGo to Control Panel>Hardware & Programs>Edit or Uninstall Programs.Then just find Skype, right click it, and select "Uninstall."
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
References
- ↑ https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal
- ↑ https://ubuntu.com/server/docs/package-management
- ↑ https://itsfoss.com/apt-remove-purge/
- ↑ https://help.ubuntu.com/stable/ubuntu-help/addremove-remove
- ↑ https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal
- ↑ https://itsfoss.com/remove-snap/
- ↑ https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal
- ↑ https://docs.flatpak.org/en/latest/using-flatpak.html
- ↑ https://docs.flathub.org/docs/for-users/uninstallation
- ↑ https://docs.flatpak.org/en/latest/using-flatpak.html
- ↑ https://help.ubuntu.com/stable/ubuntu-help/addremove-install-synaptic.html.en
- ↑ https://help.ubuntu.com/community/SynapticHowto
- ↑ https://help.ubuntu.com/stable/ubuntu-help/addremove-remove.html.en
- ↑ https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal
- ↑ https://ubuntu.com/server/docs/package-management
- ↑ https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal
- ↑ https://itsfoss.com/ppa-purge/
About This Article
Article Summary
X
1. Open the Ubuntu Software Center.
2. Click the Installed
tab.
3. Scroll to the program you want to remove.
4. Click Remove
.
5. Click Remove
to confirm.
Did this summary help you?
Thanks to all authors for creating a page that has been read 1,276,762 times.
Advertisement