Uninstalling packages in linux

Linux uninstall package / software using the CLI

Linux uninstall package / software

  1. First, you need to find a list of all installed packages on Linux.
  2. To uninstall an application, you need to use Linux distro-specific command. For example, use the apt command on Debian or Ubuntu Linux. RHEL/CentOS/Fedora Linux users need to run either the dnf or yum command and so on.
  3. Finally, we can use various commands for verification of the uninstallation of a program on Linux.

Let us see all commands in action to uninstall a program on Linux.

Ubuntu/Debian Linux uninstall software

The syntax is as follows to list all installed packages on Debian or Ubuntu Linux using the apt command:
apt list —installed

How to find out exact package names in Debian/Ubuntu/Mint Linux

Use the ‘ dpkg —list ‘ command to get a list of all installed packages on an Ubuntu or Debian/Mint Linux

grep command in action to filter out package names quickly that you want to uninstall

RHEL/CentOS/Oracle Linux

We need to use the yum command for CentOS/RHEL v6.x/7.x. First get a list, run:
sudo yum list installed
sudo yum list installed | grep package
sudo yum list installed | grep zip

yum command in action

Fedora Linux

Again, we need to the dnf command as follows:
## List all installed packages ##
sudo dnf list installed
## Filter out the package named httpd ##
sudo dnf list installed | grep httpd
## Delete the httpd ##
sudo dnf remove httpd

Arch Linux

We use the pacman command on Arch Linux to uninstall software. Pass the Q to list all installed packages on Arch Linux:
sudo pacman Q
sudo pacman Q | more
sudo pacman Q | grep sl
To delete/remove the sl package in Arch, run:
sudo pacman -R sl

pacman command in action to list and uninstall package on an Arch Linux

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

OpenSUSE or SUSE Linux removing package command

We are going to use the zypper command. To list all installed packages in SUSE/OpenSUSE, run:
sudo zypper packages —installed-only
sudo zypper packages —installed-only | grep -i package
sudo zypper packages —installed-only | grep -i zip
I am going to remove the zip package, enter:
sudo zypper remove package
sudo zypper remove zip

Alpine Linux

Use the apk command to list installed packages only:
sudo apk list
sudo apk list -I
sudo apk list -I ‘package’
sudo apk list -I ‘zip’
To uninstall the zip Linux uninstall software pass the del as follows:
sudo apk del pkg
sudo apk del zip

Читайте также:  Asus x551m не могу установить windows

apk command in action

Conclusion

You learned how to uninstall package on popular Linux distros. I would strongly recommend reading the man pages:
man yum
man dnf
man apt
man zypper
man pacman

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

Arch Linux

You are not logged in.

#1 2010-05-04 04:13:57

How to completely uninstall an app ?

Been using Arch for over 2 years by now. There’s just a small thing bugging me. I know I can remove an app nearly completely with the

But I was wondering how could I completely uninstall the app . like remove all the config files, the stuff in /usr and the entries in various menus and so on. I do understand it might not be possible, but I was just wondering whether there was something like . Revvo Uninstaller for Arch linux ?

How I’m learning linux : If it ain’t broken, fix it until it is. Then start over again.
.
Gapo the flow

#2 2010-05-04 05:45:04

Re: How to completely uninstall an app ?

Hey, gapo:
Execuse me ,but I don’t know your needs clearly.As far as I konw,the action «pacman -Rsn «will surely remove all the files,like config files in /usr,binary files in /usr/bin……except the files in your /home/. (you could remove them by yourself).What’s more,shaman will be great if you’re searching for sth like Revo Uninstaller.And you?:D

This is the way the world ends
Not with a bang but a whimper
——-T·S·Eliot

#3 2010-05-04 05:50:19

Re: How to completely uninstall an app ?

Correct. pacman -Rsn should never leave files anywhere apart from what the package stores in the users home directory.

#4 2010-05-04 06:11:50

Re: How to completely uninstall an app ?

Is there any greater difference between -Rsn and -Rscgn?

As far as I know -Rscgn uninstalls also all dependecies. Does -Rsn do this too?

#5 2010-05-04 06:20:26

Re: How to completely uninstall an app ?

Well. you can look in «man pacman» for information on flags.

The «g» does nothing with «-R» so that does not make a difference. Using «-c» with «-R» removes packages that depend on the package you are uninstalling and is likely not wanted very often.

#6 2010-05-04 09:29:55

Re: How to completely uninstall an app ?

Hey ! Thanks for the info.

Sorry I wasn’t clear. Pacman does not remove my configurations that the application creates.
I installed wine once and had a hell of a time removing all the entries it made in pcmanfm.
I was hoping for something other than deleting them by hand.

I don’t know much about Shaman though. I’m running OB, so I don’t want to drag in any qt deps. Anyway I’ll check it out.

How I’m learning linux : If it ain’t broken, fix it until it is. Then start over again.
.
Gapo the flow

#7 2010-05-04 10:04:36

Re: How to completely uninstall an app ?

Sorry I wasn’t clear. Pacman does not remove my configurations that the application creates.
I installed wine once and had a hell of a time removing all the entries it made in pcmanfm.
I was hoping for something other than deleting them by hand.

Those files are not the responsibility of pacman. Deleting them would be analogous to deleting the Text files you’ve created when you decide to uninstall nano.

Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Источник

How to Uninstall Applications from Ubuntu Linux

Last updated January 20, 2021 By Abhishek Prakash 19 Comments

Don’t use a certain application anymore? Remove it.

In fact, removing programs is one of the easiest ways to free up disk space on Ubuntu and keep your system clean.

Читайте также:  Невозможно инициализировать интерфейс windows sockets код ошибки 0

In this beginner’s tutorial, I’ll show you various ways of uninstalling software from Ubuntu.

Did I say various ways? Yes, because there are various ways of installing applications in Ubuntu and hence various ways of removing them. You’ll learn to:

  • Remove applications from Ubuntu Software Center (for desktop users)
  • Remove applications using apt remove command
  • Remove snap applications in command line (intermediate to advanced users)

Let’s see these steps one by one.

Method 1: Remove applications using Ubuntu Software Center

Start the Software Center application. You should find it in the dock on the left side or search for it in the menu.

You can see the installed applications in the Installed tab.

If you don’t see a program here, try to use the search feature.

Search Installed Apps Ubuntu

When you open an installed application, you should see the option to remove it. Click on it.

Remove Applications Ubuntu

It will ask for your account password. Enter it and the applications will be removed in seconds.

This method works pretty well except in the case when Software Center is misbehaving (it does that a lot) or if the program is a software library or some other command line utility. You can always resort to the terminal in such cases.

Method 2: Remove programs from Ubuntu using command line

You know that you can use apt-get install or apt install for installing applications. For uninstalling, you don’t use the apt-get uninstall command but apt-get remove or apt remove .

All you need to do is to use the command in the following fashion:

You’ll be asked to enter your account password. When you enter it, nothing is visible on the screen. That’s normal. Just type it blindly and press enter.

The program won’t be removed immediately. You need to confirm it. When it asks for your conformation, press the enter key or Y key:

Keep in mind that you’ll have to use the exact package name in the apt remove command otherwise it will throw ‘unable to locate package error‘.

Don’t worry if you don’t remember the exact program name. You can utilize the super useful tab completion. It’s one of the most useful Linux command line tips that you must know.

What you can do is to type the first few letters of the program you want to uninstall. And then hit the tab key. It will show all the installed packages that match those letters at the beginning of their names.

When you see the desired package, you can type its complete name and remove it.

What if you do not know the exact package name or even the starting letters? Well, you can list all the installed packages in Ubuntu and grep with whatever your memory serves.

For example, the command below will show all the installed packages that have the string ‘my’ in its name anywhere, not just the beginning.

That’s cool, isn’t it? Just be careful with the package name when using the remove command in Ubuntu.

Tip: Using apt purge for removing package (advanced users)

When you remove a package in Ubuntu, the packaged data is removed, but it may leave small, modified user configuration files. This is intentional because if you install the same program again, it would use those configuration files.

If you want to remove it completely, you can use apt purge command. You can use it instead of apt remove command or after running the apt remove command.

Keep in mind that the purge command won’t remove any data or configuration file stored in the home directory of a user.

Method 3: Uninstall Snap applications in Ubuntu

The previous method works with the DEB packages that you installed using apt command, software center or directly from the deb file.

Читайте также:  Жидкие обои для windows

Ubuntu also has a new packaging system called Snap. Most of the software you find in the Ubuntu Software Center are in this Snap package format.

You can remove these applications from the Ubuntu Software Center easily but if you want to use the command line, here’s what you should do.

List all the snap applications installed to get the package name.

Now use the package name to remove the application from Ubuntu. You won’t be asked for confirmation before removal.

Bonus Tip: Clean up your system with one magical command

Alright! You learned to remove the applications. Now let me tell you about a simple command that cleans up leftover package traces like dependencies that are no longer used, old Linux kernel headers that won’t be used anymore.

In the terminal, just run this command:

This is a safe command, and it will easily free up a few hundred MB’s of disk space.

Conclusion

You learned three ways of removing applications from Ubuntu Linux. I covered both GUI and command line methods so that you are aware of all the options.

I hope you find this simple tutorial helpful as an Ubuntu beginner. Questions and suggestions are always welcome.

Like what you read? Please share it with others.

Источник

uninstall package in linux

kt123

New Member

kenJackson

Member

No, it should remove all the files. Though I think there might be two possible special cases.

If you’ve edited any of the configuration files in /etc that are part of the package, I’m not sure it will delete them. It might rename them and leave them. (I’m not sure this is true, but I vaguely recall it is.)

Sometimes there are two packages that provide the same file. In that case, I think the package uninstaller is supposed to call alternatives to reassign the symbolic link to another choice if one is available. Try this command to see existing symlinks:

kt123

New Member

kenJackson

Member

wizardfromoz

Administrator

Just to qualify a little of what Ken has mentioned above

1. Correct on the tar.gz file.

2. /var/cache/yum is where a number of files can be stored after download, for use offline to replace/reinstall but only if caching is enabled. A few are stored by default. The command

You can also use

and other options to set rules on repositories.

For users of Fedora, substitute «dnf» for «yum».

In Fedora yum has been deprecated (basically made obsolete) in favour of dnf, but you can still use yum to some extent. That file storage area I mentioned above would be /var/cache/dnf in Fedora.

Redhat also have this, for reference —

I use Fedora 28 Workstation on one computer, and Fedora 29 Workstation on another, but I do not use centOS, yet.

Our Admin @Rob is a centOS man, and may have more input.

Chris Turner
wizardfromoz

wizardfromoz

Administrator

Just a BTW, and not particularly poking fun at Windows, although it is a fertile target

Windows does not uninstall properly and fully anyway, never has. That is why there is a phenomenon called «orphaned dll’s» and the like, and there is an industry built around cleaning up what Windows leaves behind.

Ashampoo have the best products for keeping Windows under control, and safely, and they are up to version 8 of Ashampoo Uninstaller.

kenJackson

Member

Thanks for info on ashampoo. Looks like they have some interesting stuff.

After enjoying the wonderful convenience of a package manager and repository on Linux, installing and updating on Windows seems archaic. They seriously need a package manager. Though they can’t do that for commercial apps, because the producers of commercial apps will always want to maintain tight control of distribution of their products.

But I finally found a good package manager for free and shareware apps under Windows. Chocolatey. Once it’s installed, you can install packages like this

Источник

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