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

Building RAG with enterprise open source AI infrastructure

One of the most critical gaps in traditional Large Language Models (LLMs) is that they…

13 hours ago

Life at Canonical: Victoria Antipova’s perspective as a new joiner in Product Marketing

Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…

2 days ago

What is patching automation?

What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…

3 days ago

A beginner’s tutorial for your first Machine Learning project using Charmed Kubeflow

Wouldn’t it be wonderful to wake up one day with a desire to explore AI…

4 days ago

Ubuntu brings comprehensive support to Azure Cobalt 100 VMs

Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…

4 days ago

Ubuntu Weekly Newsletter Issue 870

Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…

4 days ago