How to uninstall package on 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:

See also  Install and Secure phpMyAdmin on Ubuntu 16.04 VPS

How to uninstall package on ubuntu 1

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

How to uninstall package on ubuntu 2

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:

How to uninstall package on ubuntu 3

A dialogue box will appear, click on Remove:

How to uninstall package on ubuntu 4

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:

See also  Bring home the disco with these Raspberry Pi HAT tutorials (Part 1)
Sponsored
$ sudo apt remove nodejs

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

How to uninstall package on ubuntu 5

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.

How to uninstall package on ubuntu 6

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.

How to uninstall package on ubuntu 7

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

How to uninstall package on ubuntu 8

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.


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply