Categories: Ubuntu

How to uninstall package on Ubuntu

Are you a new Ubuntu user and facing storage problems and want to delete unnecessary packages then you are in the right place. Ubuntu allows you to install and uninstall the package by both graphical user interface and command line interface.

A “package” is a compressed file archive that contains all of the files that come with a given application in Linux distributions. New software for Linux-based PCs is delivered and maintained by a package. Executable installers are used in the same way as executable installers are used on Windows-based machines.

In this article two ways to uninstall a package from the Ubuntu system are discussed. You can follow any of the two according to your requirements.

Uninstalling
Sponsored
Package Using Software Center of Ubuntu

Software center is like the App store of Apple and allows you to install and uninstall packages. If you are a new user and find the command line difficult then you can uninstall the package through the software center if it’s installed by Ubuntu software center.

Step 1: Open Ubuntu Software Center
Click on icon of Software Center from the list of icons on left side of Ubuntu screen:

Step 2:  Open installed apps
Click on installed tab on Ubuntu software center:

Step 3: Remove Package/App
Now you can remove any package which is present in installed packages of Ubuntu software center. I am removing Document Scanner from installed packages by clicking on the “Remove” button in front of package to be removed:

A dialogue box will appear, click on Remove:

Uninstalling Package on Ubuntu Using Command Line

Some installed packages are not available in “installed packages” of Ubuntu software center so we can remove them using the terminal. There are three ways to remove package using command Line:

  • apt
  • dpkg
  • snap

Uninstalling Package using “apt” : The best way is to use the “apt” command to remove packages.

The apt( Advance Packaging Tool) is the default package manager of Ubuntu.

$ apt remove

Set the package-name which you want to remove.

Example: Run the below mentioned command to remove “nodejs” package from Ubuntu system:

$ sudo apt remove nodejs

In place of “nodejs” write the name of the package you want to remove.

Sponsored

Uninstalling Package Using “dpkg”: We can also remove package from system using dpkg command, dpkg is a Debian package manager that allows you to install, build, uninstall, and manage packages:

$ sudo dpkg –r

Change “package-name” according to your requirement.

Example: Run the below mentioned command to remove “make” package from Ubuntu system:

$ sudo dpkg -r make

In place of “make” write the name of the package you want to remove.

Uninstalling Package using “snap”: Although the Snap package manager is very new, it is included in all current Ubuntu editions. To uninstall packages, which were installed as snap packages you need to run the snap command which works independent of apt command. The syntax is given below:

$ sudo snap remove

Set “package-name” which you want to remove.

Example: Run the below mentioned command to remove “rocketchat-server” package (which is installed as snap package) from Ubuntu system:

$ sudo snap remove rocketchat-server

In place of “rocketchat-server” write the name of the package you want to remove.

Uninstalling unnecessary Packages : Your package management may download dependencies that are required to correctly install a package while installing some software. These dependencies will remain on your system after it finishes installing a package, but they will be unused. As a result, it’s a good idea to run the following command on a regular basis to clear out any unwanted packages from your system.

Run the below mentioned command to remove unused packages:

$ sudo apt autoremove

Conclusion

To free up the space occupied by some unused packages, Ubuntu allows you to remove these unnecessary packages from your system. In this article we discussed in detail how to uninstall unwanted packages using the Ubuntu software center and using the command line in which commands are discussed to remove packages from the system; using apt, dpkg and snap. Read the article carefully to uninstall unnecessary packages from your Ubuntu system.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

2 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

5 days ago