How to uninstall packages from Linux?
Last Updated :
03 Jun, 2022
In this article, we will learn to uninstall the different types of packages from Linux.
Let's understand the uninstalling process through some examples:
Example 1: Uninstall a package using apt-get
In this example, we will remove GIMP, a graphics software that was installed with the help of apt-get.
Step 1: To list all the apt-get packages, enter the following command in Terminal:
dpkg --list
As you can see, gimp is installed in the output
Step 2: Now run the following command to uninstall any package. Here the package is GIMP.
sudo apt-get --purge remove gimp
The output is as follows:
Example 2: Uninstall the SNAP package
Snap packages are very popular, and in this example, we again have GIMP as a snap package to uninstall.
Step 1: Run the following command to check the exact name
snap list
The gimp software is highlighted in the output
Step 2: Run the following command to remove it.
sudo snap remove gimp
The output is as follows:
Example 3: Using autoremove command
We will uninstall the GIMP software as an apt-get package. We may not always want to uninstall the configuration file.
Step 1: So run the following command to remove it.
sudo apt-get remove gimp
The output is as follows:
Step 2: And then if you want to remove unnecessary packages that were required for gimp exclusively to be not present, then run the following command.
sudo apt-get autoremove
The output is as follows
Step 3: Finally, run the following command so that everything is fine
sudo apt-get clean
This doesn't have any output but is affected internally for the apt repository.
Similar Reads
How to Uninstall npm The Npm package is used in web development. It is a vital tool for JavaScript developers, enabling them to use open-source libraries and packages. With npm, developers can effortlessly integrate third-party results, enhancing their systemâs functionality and effectiveness. Its rich package repositor
2 min read
How to fix broken package in Ubuntu? It can be very annoying when your package is broken in Ubuntu. But relax, itâs simple to fix with a few commands. For any Ubuntu user, having the ability to resolve package issues is an important skill in troubleshooting. You will quickly get your system back up and running if you take the time to l
5 min read
How to Uninstall Packages With Apt Package Manager in Linux The apt command is a sophisticated command-line tool that interacts with Ubuntu's Advanced Packaging Tool (APT) to execute tasks including installing new software packages, updating the package list index, and even upgrading the whole Ubuntu system. Along with this, we can uninstall or remove the do
2 min read
How to uninstall jupyter Popular open-source software called Jupyter Notebook enables you to create and share documents with live code, equations, visuals, and text. Scientific computing and data science both make extensive use of it. However, there may come a time when you need to uninstall Jupyter from your system for var
5 min read
How to uninstall PyCharm? Python is one of the most popular languages referred to by many developers and programmers. Python provides different features which enhance the productivity of application development. To code Python applications, we prefer various IDE (Integrated Development Kit) like VSCode, Spyder, Jupyter, etc.
4 min read