How to remove programs completely on Arch Linux, including files that it created in home directories?
Pacman saves important configuration files when removing certain applications and names them with the extension: .pacsave. To prevent the creation of these backup files use the -n option:
# pacman -Rn package_name
Note: Pacman will not remove configurations that the application itself creates (for example "dotfiles" in the home folder).
Basically, pacman will not remove those configuration files in Home folder you will have to remove them manually. Those packages created by the application have no impact on a system after you remove the package so it won't do any harm. That is just how it works.
Usually all the configurations files created by the apps are in ~/config
folder. You can just type in terminal rm -r
and drag & drop folders to terminal and click Enter or whatever works best for you.
![200_success](https://i.stack.imgur.com/1f9W9.png?s=256&g=1)
200_success
Former moderator of https://codereview.stackexchange.com
Updated on September 18, 2022Comments
-
200_success almost 2 years
I'd
atom
installed on the system and tried to remove it with:pacman -Rs atom
I still have a
.atom
folder in/home/user
and anotherAtom
folder in/home/user/.config
, not sure whether there's anymore left in any other place!How to remove programs together with all the folders and files it created automatically over the time?
-
炸鱼薯条德里克 almost 5 yearsUnless you trace the program every time it runs, or you can't do this
-
炸鱼薯条德里克 almost 5 yearsOr alternatively, run the program every time in a sandbox environment, like using mount namespace to restrict its filesystem writing on one single directory. But this won't work for all program, some program will not fully function in sandbox environment
-
200_success almost 5 years@炸鱼薯条德里克 Please don't answer in comments. If the answer is that it's impossible, then write that as an answer.
-
-
Matt Alexander over 2 yearsI think you meant to say
~/.config
, not~/config
. Also look at~/.local
and~/.cache
for other things that were left behind. Also, some applications don't follow the XDG Base Directory Specification, so there are usually~/.*
things to review too.