How to uninstall packages on Ubuntu

Sometimes, you may install an application on Ubuntu, and try the application, and then decided not to fit the application. In this case, you may need to uninstall the package.

In this article, we'll show you how to use graphical "Ubuntu Software Center" as well as from the command line aptor  apt-getcommand to uninstall the packages .

Only root or have the sudoprivileges of the user to uninstall packages from Ubuntu.

Uninstall packages using the Ubuntu Software Center

If the command line is not what you need, you can uninstall the application through the Ubuntu Software Center (USC). This utility provides a graphical interface to find, install and uninstall applications.

  1. In the "Activities" screen, search "Ubuntu Software" and then click on the orange icon USC. This opens the USC tool.

  2. To get a list of all installed applications, click the tab "installed" on the top navigation bar.

  3. Scroll down until you find the application you want to uninstall, and then click the "Delete" button next to it.

  4. Ubuntu software tool to display only has a graphical user interface (GUI) of installed applications. If you can not find the package you want to uninstall, you should remove the package from the command line.

Uninstall packages using the command line

Using the GUI tool can perform all operations can be executed from the command line. In fact, the command line gives you more options and controls for unloading packages.

You can use the Ctrl+Alt+Tkeyboard shortcut or click the icon to open the terminal end.

Before uninstalling the package, you must first find the exact package name. To get on the system all installed packages in the list, do the following:

sudo apt list --installed

This command will print a long list of installed packages. Preferably the output is piped lessto make it easier to read. Or you can use thegrep filter results.

On Ubuntu, Debian and related Linux distributions, you can use aptand the apt-getcommand-line utility to install, update, uninstall and manage packages . The same syntax of these two commands.

To delete the installed packages, run the following command:

sudo apt remove package_name

Replace package_namethe name of the package you want to delete.

sudo apt-get remove package_name

You can also uninstall multiple packages. B package name should be separated by spaces:

sudo apt remove package1 package2

This removecommand will uninstall a given package, but may leave some of the package file. If you want to delete the package that contains all the files, usepurge instead of remove:

sudo apt purge package_name

Uninstall snapshot package

If you want to uninstall is not listed in the application is running, sudo apt list --installedit may be a snapshot of the installed packages.

To list all installed packages snapshots, run the following command:

snap list

Know the exact name of the package, you can type the following to uninstall it:

sudo snap remove package_name

Uninstall unused software package

Whenever you install new software packages depend on other packages, the package dependencies will also be installed. After uninstalling the package, the package will remain dependent on the system. The rest of the package will no longer be anyone else, and can be deleted.

You can remove unneeded bundles using the following methods: 

sudo apt autoremove

in conclusion

We've shown you how to use the command line and removed from the Ubuntu Software Center in Ubuntu applications. You know how to remove packages are an important part of Linux system administration.

There are several reasons why you want to remove the previously installed packages from the Ubuntu. For example, you may need to uninstall the application no longer needs or free up disk space.

Guess you like

Origin www.cnblogs.com/livelab/p/12455801.html