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

Cut data center energy costs with bare metal automation

Data centers are popping up everywhere. With the rapid growth of AI, cloud services, streaming…

13 hours ago

Build the future of *craft: announcing Starcraft Bounties!

Our commitment to building a thriving open source community is stronger than ever. We believe…

13 hours ago

NodeJS 18 LTS EOL extended from April 2025 to May 2032 on Ubuntu

The clock was ticking: Node.js 18’s upstream End of Life (EOL) The OpenJS Foundation is…

13 hours ago

Native integration now available for Pure Storage and Canonical LXD

June 25th, 2025 – Canonical, the company behind Ubuntu, and Pure Storage, the IT pioneer…

2 days ago

Revolutionizing Web Page Creation: How Structured Content is Slashing Design and Development Time

Co-authored with Julie Muzina A year ago, during our Madrid Engineering Sprint, we challenged ourselves…

3 days ago

Ubuntu Weekly Newsletter Issue 897

Welcome to the Ubuntu Weekly Newsletter, Issue 897 for the week of June 15 –…

3 days ago