How to remove residual files after uninstalling an application in Linux

Remove residue on Linux

This article may look the same as the one my partner Isaac just published a few minutes ago, but it is not. His article explained to us how to free up space and in this we are going to focus on another type of cleaning. When we uninstall a program in Linux, it usually leaves traces and what we are going to explain here is how to remove residual files after uninstalling an application on Linux, for which we have several options.

For some years now, in Linux we have what are known as new generation packages. With Flatpak and Snap in the lead, although there are also AppImage, these are packages that include main software and dependencies in the same package, which means that they are cleaner than their counterparts in repositories. Still, they can leave some remains and in this article you will learn everything you need so that you only have what you need installed on your computer.

The different ways to delete residual files in Linux

Especially when we get the software online, there are many apps that include how to delete the residual files in a file that is usually called "Install" or "Readme". This is something that we cannot find when we have installed the software from official repositories, but there are general ways to clean as much as possible, such as the following:

apt purge

To remove a software and all its related files, we have to execute the following command:

sudo apt purge nombre-del-paquete

From the above command, we have to change "package-name" to the package in question, which for VLC would be "sudo apt purge vlc" (without the quotes). Once the command has been written, pressed Enter and entered our password, it will read, it will show us the packages to be removed and it will ask us, at which point we will have to press Y (es) or Y (í) followed by Enter to eliminate all the waste that we had left of that application and we no longer need.

apt autoremove

If we are used to using the "apt remove" command to remove software in Linux, we will be left with a lot of residual files. We can eliminate them all at once with the following command:

sudo apt autoremove

As with purge, it will perform the reading, it will show us what it is going to delete and it will delete it. It seems important to mention that this command will remove old kernel versions as well, so it must be taken into account if we want to keep them for any reason.

yum remove

If your distribution uses YUM instead of APT, the command will be different. The command to VLC would be the following:

sudo yum remove vlc

If we have installed packages using the groups function from YUM, we will have to delete them as a group using this other command:

sudo yum remove @"nombre del grupo"

Option with GUI: Synaptic

If we don't like the terminal, we also have user interface options like Synaptic. It is a package manager that many of us will know because it was included by default in popular Linux distributions such as Ubuntu. If we do not have it installed by default, we can do it from our software center or with the following command:

sudo apt install synaptic

Once we start it, it will ask us to enter our user password because it needs privileges to make the changes. And to completely remove an app, we just have to do the following:

Delete residual files with Synaptics

  • We look for it from the magnifying glass icon (Search).
  • We right click on it
  • We choose the option «Mark to uninstall completely».
  • In the window that appears with the related packages, we click on "Mark".
  • Finally, we click on «Apply».

Delete residual configuration files

Uninstalling the applications does not clean everything related to them; there are still likely to be configuration files. To eliminate them, we have to navigate and look for the name of the app in these paths (where ~ / is our personal folder and the folders with a dot in front are hidden):

  • ~/
  • / usr / bin
  • / Usr / lib
  • / usr / local
  • / usr / share / man
  • / usr / share / doc
  • / var
  • / run
  • / lib
  • ~ / .cache
  • ~ / .local
  • ~ / .local / share
  • ~ / .thumbnail
  • ~ / .config /
  • Flatpak packages usually clean everything up automatically, but Snap packages leave their configuration files at ~ / snap.

And so we can have our Linux-based operating system clean of residual packages.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

3 comments, leave yours

Leave a Comment

Your email address will not be published.



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Bill said

    GNU / Linux. Not "Linux". Once and for all, please. The instructions do not work for any operating system that uses Linux, such as Android.

  2.   Pauet said

    KDE users can use Muon instead of Synaptic for the same purpose.


  3.   Odysseus said

    These instructions are for Debian / Ubuntu and related only. They do not work for Arch Linux. They should be clear on that so as not to confuse people who are just starting out.