Introduction
Before we begin talking about how to uninstall software packages on Ubuntu, let's briefly understand – What are software packages ?
- A software package is a bundle of files needed to run programs on the operating system.
- These packages are conveniently bundled together and easily installable, providing a seamless experience for users.
- With a wide variety of software packages available in the Ubuntu software repositories, users can easily find and install applications, libraries, and tools for their specific needs.
Ubuntu packages can only be uninstalled by root or a user with sudo
privileges.
In this tutorial, you will uninstall software packages on Ubuntu. We will also address a few FAQs on how to uninstall software packages on Ubuntu.
Advantages of software packages
- Enhanced system performance: Swap space increases overall system performance by providing extra virtual memory.
- Efficient memory management: It allows the system to free up RAM by swapping out less-used data to the swap space.
- Supports multitasking: Swap space enables the system to handle numerous processes simultaneously, preventing memory exhaustion.
- Prevents crashes: It helps prevent crashes and out-of-memory errors, ensuring system stability even when memory-intensive applications are running.
- Hibernate support: Swap space facilitates hibernation, allowing the system to save its state to disk and power off, resuming from where it left off.
Uninstalling Packages using the Ubuntu Software Center
If you prefer not to use the command line, you can uninstall applications using the Ubuntu Software Center (USC). This utility provides a graphical interface for finding, installing, and uninstalling apps.
- Search for “Ubuntu Software” on the Activities screen and click the orange USC icon. This will launch the USC tool.
- Click on the “Installed” option in the top navigation bar to see a list of all installed applications.
- Once you have located the application you wish to uninstall, scroll down and click on the “Remove” button next to it.
Only installed programs with a graphical user interface (GUI) are displayed by the Ubuntu Software utility. If you are unable to locate the application you wish to uninstall, you should uninstall the package using the command line.
Uninstalling Packages using the Command Line
Everything that the GUI tools allow you to perform, you can also do from the command line. In actuality, you have more options and flexibility when removing software packages using the command line.
With the keyboard shortcut Ctrl+Alt+T
or by selecting the terminal icon, you can open your terminal.
You must first locate the specific package name before removing the software. Type the following to receive a list of all installed packages on your system:
sudo apt list --installed
The command will print an extensive list of the installed packages. To make things easier to read, it might be a good idea to pipe the output to less
. You might also filter the results using grep
.
With the apt
and apt-get
command-line utilities, you may install, update, uninstall, and manage software packages on Ubuntu, Debian, and related Linux distributions. Both commands have the same syntax.
Use the following command to uninstall an installed package:
sudo apt remove package_name
If you want to uninstall a package, replace package_name
with its name.
sudo apt-get remove package_name
Moreover, you can uninstall numerous packages. The names of the packages should be separated by a space:
sudo apt remove package1 package2
The remove
command removes the specified packages, however, it can leave behind certain package files. If you would like to discard the package including all its files, use purge
instead of remove
:
sudo apt purge package_name
Uninstall Snap Packages
The application you want to uninstall was presumably installed as a snap package if it is not listed when you run sudo apt list --installed
.
Run the following command to list every installed snap package:
snap list
You can uninstall a package after you know its specific name by typing:
sudo snap remove package_name
Uninstall Unused Packages
The package dependencies are installed along with each new package you install that depends on other packages. The dependent packages will remain on the system after the package is uninstalled. These unused packages can be removed because they are no longer needed by anything else.
You can uninstall the unwanted packages using:
sudo apt autoremove
FAQs to Uninstall Software Packages on Ubuntu
What is the difference between "remove" and "purge" commands?
The "remove" command uninstalls the package, while "purge" not only removes the package but also deletes its configuration files.
How can I see a list of installed packages on Ubuntu?
Use the command dpkg --list
to view a comprehensive list of all installed packages.
What if I want to keep the configuration files when uninstalling a package?
Use the command sudo apt-get purge <package-name>
to remove the package but retain its configuration files.
Can I uninstall packages installed from external sources or software not managed by APT?
Yes, you can manually uninstall such packages by following the provided uninstallation instructions specific to that software.
How can I remove dependencies that are no longer needed after uninstalling a package?
Run the command sudo apt-get autoremove
to remove unused dependencies from your system.
Is there a graphical way to uninstall software on Ubuntu?
Yes, you can use software managers like "Synaptic Package Manager" or "Ubuntu Software Center" to uninstall packages using a graphical interface.
What if a package refuses to uninstall or shows errors during the process?
In such cases, try using the command sudo dpkg --configure -a
to fix any unresolved dependencies or errors before attempting uninstallation again.
Conclusion
You now know how to uninstall programs from your Ubuntu system using the Ubuntu Software Center and the command line. A key component of Linux system administration is being able to remove packages.
You might want to uninstall a previously installed application from your Ubuntu for various reasons. For instance, you may need to uninstall an application you no longer require or clear up disk space.
If you have any suggestions or queries, kindly leave them in the comments section.