Linux how to uninstall package

How can I uninstall software?

Seeing there are various ways to install on Ubuntu. What are the various ways to uninstall items? Which ways always work? How can I be sure something was uninstalled?

11 Answers 11

If the application has been installed via the package manager, all you have to do is run

That should always work. If the terminal isn’t what stirs your tea, you could open System → Administration → Synaptic Package Manager, search for the package you want to remove, click on the checkbox next to it and select «mark for removal». Once you click «Apply», the package should be removed. There’s of course also the Ubuntu Software Center. It’s pretty much the same thing as Synaptic. Just search for the application name and click the «Remove» button.

Sometimes applications can be split up into multiple packages (for example, many games have a separate package for their music). To make sure that you uninstall all related packages AND configuration files, you can type

or -in Synaptic- «mark for complete removal» instead of just «mark for removal».

As for applications that have been manually compiled and installed, there’s not always a single way to remove them. The best thing to do is consult the README/INSTALL file that accompanied the source package — if one exists.

In the

Install synaptic

  • Synaptic : the same

A program selected with the option

 sudo apt-get remove && sudo apt-get autoremove 

It’s important to note that when you install things, they often depend on other packages. When you fire off apt-get remove it doesn’t remove the automatically-installed applications by default. This is often safer (if you’re temporarily removing something like ubuntu-desktop) but this can mean you end up with a load of cruft.

aptitude will automatically remove things (as well as having a nice interactive command line interface)

You can also search for cruft in synaptic using the «local or obsolete» filter under the status section.

the apt-get-version can be shorter & easier: sudo apt-get autoremove

+1 for autoremove it looks like that also removes dependencies that were installed along with the original program? nice to keep from cluttering things up.

To find the package you want to remove, use

Copy the package name and then use command

Here’s a rundown of the possible ways:

If the package has been installed via a package manager, you can remove it with one of the tools provided with this purpose:

  • dpkg —remove : the most basic command-line tool. Avoid.
  • apt-get remove or aptitude remove : these are the standard command-line tools. Aptitude is slightly preferred: it’s a bit more sophisticated. E.g., it can keep a log file of all package operations.
  • synaptic : GUI tool accessible through the GUI menu under «System/Administration». Supports all features, a very nice program generally.
  • software center : even nicer GUI than synaptic . This is a better, updated version of the old «Add/Remove Programs»
Читайте также:  Linux посмотреть группу папки

All these get the job done. You can start with the most user-friendly (Software Center) and continue to aptitude, if you need certain features or install or remove programs very frequently.

Note that these operations remove the bulk of the program while sometimes leaving «configuration files» in locations such aus /etc/apache2. Most software doesn’t have configuration files there; some server software («daemons») do. In all but a few cases, keeping these configuration files will do no harm. If you want to remove everything, including configuration files, then you can use the «purge» operation. For aptitude, the command line is «aptitude purge.» (Tommy’s explication above of «purge» is not accurate. The «remove» operation, just like «purge», deletes all dependencies that were pulled in with the original program.)

If the program tells you the package has been removed, you can be sure that the files are gone. Sometimes packages installed as a matter of dependency are not removed immediately. They will be eventually deleted, at a subsequent run.

As to software installed from other channels (typically compiled from source), you’re mostly forced to remove the files installed manually. They are often located somewhere in /usr/local . Some software provides shortcuts such as «make uninstall». Don’t count on it, though. More often than not, the cleanest solution is to use the version provided through Ubuntu’s repositories, which can be uninstalled cleanly.

Источник

How to Remove Packages from Ubuntu & Debian

The APT (Advanced Package Tool) is a powerful package management tool for Debian based systems. It provides powerful command-line tool like “apt” or “apt-get”. Which is used to install, upgrade or remove a software package on your Debian system.

In this tutorial, you will learn to how to uninstall or remove packages from a Ubuntu or Debian Linux system.

How to Remove Packages via Command Line

You can use “apt” command line tool for removing packages from your system. For older version of operating systems use “apt-get” command with the same options.

Use one of the below options to remove, purge packages from system. Clean the cache files to remove unused software’s from the system.

Using remove option:

To remove a specific package, use the apt remove command:

sudo apt remove [package-name] 

This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.

Using purge option:

The default remove command only deletes the software files from the system, but keep all the configuration files for safety purpose. In case of accidental deletion the configuration and data files are safe.

If you want to completely remove all the data, application and configuration files, use –purge option with the above command. like:

sudo apt remove ––purge [package-name] 

Using clean option:

Use this option with apt to delete all the cache files of deleted software from your system.

Also removes the apt package manager cache from system.

Using autoremove option:

Most of the software’s installed the dependent packages on your system. Which you can see during the installation of any software on your system. But they still remains on your system after removing the original package your installed.

Читайте также:  Res common os incompat ошибка linux

With the help of this command, you can remove orphaned dependencies from system

Any users don’t feel comfert with command line can use the graphical interface to remove packages from system.

Uninstall Packages via Graphical Interface

The Desktop users can remove packages using the Ubuntu software center. The Ubuntu software center provides you a graphical interface for installation, update and removal of the packages from system.

Search for the Ubuntu software center under the applications and launch it.

Open Ubuntu Software Center

Go to the installed tab. Here you will find a list of all packages installed on your Ubuntu system. Find your package and click “Remove” button in front of the package name. See below image:

Remove package from Ubuntu

A confirmation dialog will appear here. Again click click to complete deletion.

Delete Software from Ubuntu

You may prompted for a sudo password of your account to complete the package removal process.

Conclusion

This tutorial describes a several ways to remove packages from a Ubuntu Linux systems.

Источник

How do I uninstall a package in Ubuntu?

While you work in the Linux environment, most applications or packages you found useful for solving your problems, but after trying these applications, you want to uninstall these packages from your system. It is an easier way to uninstall packages using the graphical interface. However, you should have basic knowledge about how to uninstall or remove a package from a Linux system using the command-line method.

In this tutorial, we will talk about how you uninstall a package in Ubuntu distribution using both methods: either using the GUI or by using the command-line environment.

Prerequisites

To uninstall or remove a package from the Ubuntu Linux system, you must have root privileges to run the terminal commands.

Methods to uninstall a package in Ubuntu 20.04 system

Using the following two ways, you can uninstall a package from the Ubuntu 20.04 operating system:

  1. Uninstall a package from Ubuntu using the Terminal (Command-line method)
  2. Uninstall a package from Ubuntu using the GUI

Method 1: Uninstall a package using the Terminal (Command-line method)

Most Ubuntu Linux users prefer to use the command-line method to uninstall or remove an application from the Ubuntu system. The command-line method offers more control and options for uninstalling the packages.

List installed Ubuntu packages

It is necessary to know the exact package name to uninstall a software or package from your Ubuntu system. Therefore, in Ubuntu 20.04 system, you can view the installed packages by using the following command:

The above command displays the large list of installed packages on your system. but, it would be difficult to find the exact package name from the displayed, installed packages list. To view output in the more readable form, use the ‘less’ with the above command as follows:

Press enter to move on to the next package.

You can also search the exact package name from the whole list by using the grep command as follows:

For example, to find all ‘apache2’ packages, use the below-mentioned command:

Commands to remove a package using Terminal in Ubuntu

The following four most commonly used commands that help you to remove a software package or an application from the Ubuntu system:

Читайте также:  Linux mint to linux mint remote desktop

Uninstall a package using the ‘remove’ command
To uninstall or remove a package from the Ubuntu system, use the ‘apt-get remove’ command followed by the package name as follows:

You can also remove more than one package at the same time by using the following command syntax:

For example, we want to uninstall ‘zip’ and ‘wget’ packages from the Ubuntu system. Use the below-mentioned command to uninstall these packages:

Uninstall package using ‘purge’ command
The ‘apt-get remove’ command removes the entire package from your Ubuntu system. But, it leaves some packages and configuration files behind on your system. However, to completely uninstall a package including all configuration files, use the ‘purge’ instead of executing the ‘remove’ command. The following ‘purge’ command is used to uninstall a package from the Ubuntu system completely:

For example, to uninstall apache2 packages along with all configuration files from your system, use the below command:

Uninstall unused packages
When you install an application on Ubuntu, it may also download and install the dependencies required to install the application properly. When you uninstall the required packages, the packages dependencies still linger in your system but are unused. These leftover or unused packages can remove from the Ubuntu system by executing the following command:

You can also clean the outdated/ old packages from the cache by running the below-mentioned command:

Uninstall snap packages
The snap package manager is a part of the new Ubuntu versions. So, when you independently uninstall a package using snap, you need a list of all installed snap packages. Using the below-given command, you can easily display the list of all installed snap packages:

Once the installed snap packages list is obtained, use the following command to uninstall the snap package:

For example, to uninstall the ‘discord’ application from the snap list, use the following command:

Method 2: Uninstall a package from Ubuntu using the GUI

The alternative way to uninstall a package is using the Ubuntu software center. The software package manager is available on the left sidebar of your Ubuntu desktop. To access this application click the ‘Ubuntu software’ icon or launch it using the application search bar as follows:

The following Ubuntu software manager window shows on your system. Click on the ‘Installed’ tab to see all installed packages. Here, you can search for an application that you want to uninstall from your Ubuntu system.

Select the application that you want to remove from your Ubuntu machine as follows:

Conclusion

We learned different commands through which you can easily uninstall a package or software from your Ubuntu 20.04 system. Moreover, we also demonstrated how to remove or uninstall a package using the GUI of the Ubuntu software center. You can adopt any method from either uninstalling a package via command-line or using the GUI; these methods are useful for every Linux user.

About the author

Samreena Aslam

Samreena Aslam holds a master’s degree in Software Engineering. Currently, she’s working as a Freelancer & Technical writer. She’s a Linux enthusiast and has written various articles on Computer programming, different Linux flavors including Ubuntu, Debian, CentOS, and Mint.

Источник

Оцените статью
Adblock
detector