Introduction

This tutorial will walk you through several methods for removing software packages from an Ubuntu Linux system. We detail removal options using the GUI (graphical user interface) built in to the Ubuntu Software manager and using the command line.

how to uninstall packages or programs in ubuntu

Prerequisites

  • A user account with sudo / administrative privileges to install/uninstall software from Ubuntu
  • Access to a terminal window/command line (Ctrl+Alt+T) – optional

6 Ways to Uninstall Ubuntu Software

Use Ubuntu Software Manager

If you run Ubuntu with the default graphical interface, you may be familiar with the default software manager. This graphical tool gives a list of available and installed programs. Launch it by clicking the Ubuntu Software button.

ubuntu software logo

Once the utility loads, there are three tabs across the top:

  • All – This lists all available software. You can search this list for new programs to add.
  • Installed – This lists only the programs you have installed.
  • Updates – This lists any programs that have available updates. You can find more information about the updates from here.

Click the Installed tab. Scroll down the list of programs, then click the Remove button next to the program to uninstall.

removing software from ubuntu using the GUI

Use the Synaptic Package Manager

The default Ubuntu Software Manager may not display every application on your system. The Synaptic Package Manager is a more robust application. The Synaptics Package Manager is included by default in some versions of Ubuntu. Use the search bar to find and launch it on your system.

If your system does not include Synaptic Package Manager, use the Ubuntu Software Manager to install it.

Once the Synaptic Package Manager loads, use the menu on the left to select Status then Installed. This list all applications on your system.

To remove an application, highlight it > right-click > click Mark for Removal > Apply. This will uninstall the software, but leave the configuration files intact.

To delete the standard configuration files along with the package, select Mark for Complete Removal instead.

remove package using the synaptic package manager


Note: It's easy to mistake the Synaptic Package Manager for the Synaptics Touchpad driver. They are different applications, even though they have similar names.


Uninstall Software on Ubuntu From Command Line

Dpkg is a standard package manager in many versions of Linux. It’s an important tool as you need to know the exact name of the software package to uninstall it.

To list installed packages enter the following into a terminal window:

sudo dpkg ––list

This command lists all the software, but the list may be too long and not helpful.

To make a list easier to browse add the following:

sudo dpkg–query –l | less

If you know the name of the package you want to remove, you can search for it instead:

sudo dpkg–query –l | grep package_name

Replace package_name with the term you are searching for.

If you don’t know the full name, specify part of a name by surrounding it with asterisks, as follows:

sudo dpkg–query –l | grep *partial_name*

We suggest copying the exact package name (right click and then copy) for use later on in the removal process.

Apt-Get Remove Command

To remove a specific package, use the remove command:

sudo apt-get remove package_name

This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.

Apt-Get Purge Command

Replace the package_name with the actual package name generated by apt or dpkg.

The remove command only deletes the software, not the configuration files.

To remove the program and config files, use the purge command:

sudo apt-get remove ––purge package_name

Clean Command

The apt package manager can also clean up your system.

To delete the cache of old/outdated packages, enter:

sudo apt-get clean

Some programs are installed with dependencies. These are other software packages the program needs to run. It’s possible to uninstall an application, and still have all its dependencies still in your system.

This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.

AutoRemove Command

The apt package manager can remove orphaned or unnecessary dependencies with autoremove:

sudo apt-get autoremove

If you have any failed installations, broken dependencies, or corrupted package files, apt can try to repair them with the command:

sudo apt-get –f install

This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.

Conclusion

Now you should have a good understanding of several ways to find and remove programs from Ubuntu Linux.