You are not logged in.

#1 2007-12-26 23:25:33

tuneman
Member
Registered: 2007-12-26
Posts: 2

Residual data leftover after package removal?

Hi there:

I am a new Arch user and a somewhat-new linux user in general.  I apologize if this question has been asked but I searched the forums and the web and did not find a very informative answer.

This may actually apply to many distributions in general, but I am asking about arch/pacman specifically.  I have tried many distros and stumbled on Arch after trying to find a minimalist system that would encourage me to understand what is going on when running linux.  I have had many issues but thanks to this forum and other web pages I've found through Google I now have a wonderful arch system running xcfe4 that handles just about everything I'd like it to.  However, during the course of my experimenting I have installed/removed quite a few packages.  I use pacman and yaourt and have been really pleased with how simple it is.

My question is: even when you correctly remove a package using pacman, what, if anything, is left over on your system?  For example, when I tried ubuntu I noticed that even when I removed a package, settings were sometimes still stored in gconf.  I realize ubuntu doesn't use pacman and things are different on arch (though I have gconf installed, regrettably, as a dependency), but I am interested in really keeping my system clean so I can use it indefinitely without reinstalling.  My question is certainly not limited to gconf alone... are there any other folders, settings, files, etc. that are commonly left over?  Also, I realize the answer may be package-specific.  Maybe some packages are "nice" about uninstalling and some aren't?

I supposed this question could be better phrased: how good at uninstalls is linux/arch really?  When I remove a package I would like all evidence of it having been there erased as well.  I guess I am a "clean" perfectionist.  I am hoping this question is not too broad for some answers.  I am already familiar with dependencies and how to check for/remove them, and how to clean out the pacman cache.  I am interested in what happens when I remove a package.

Thank you everyone in advance; again, I hope this is not obvious to everyone but me but I have tried for weeks to find out!

Offline

#2 2007-12-26 23:37:15

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Residual data leftover after package removal?

The command "pacman -R" removes just the package (but leaves config files, dependencies and leaves the actual downloaded package in the cache).  If you want to "purge" a package from the system the trick is to use additional switches when removing it -- "pacman -Rscn" would, for example, remove all I've mentioned above (package, deps, configs and package files from cache).  I don't know about things like settings in gconf.  Also, if you created a config file from scratch it wouldn't be removed by pacman, I think, and you'd have to remove it manually.  In either case - see "pacman -R --help" for more info. 

Oh, and welcome to Arch!

Last edited by fwojciec (2007-12-26 23:38:37)

Offline

#3 2007-12-27 00:31:09

tuneman
Member
Registered: 2007-12-26
Posts: 2

Re: Residual data leftover after package removal?

Thank you very much for your answer.  I had looked at the pacman guides out there and saw what you could do with switches, but never put together a command like that.  And, as a recent migrant from Windows, it still surprises me what you can do with the command-line.  I guess I never knew that those switches would remove configs, etc.  In Windows, I was always dismayed with the way settings and residual files were scattered around the system.  I got used to having to reinstall every three to six months.  I shouldn't be surprised, but I am, at the clean way linux manages software.

And as for sticking with linux/arch, I am pretty much sold (especially since it is free, which is yet another reason to move away from Windows).  Thanks to the user-provided info out there I have overcome a lot of obstacles to move to linux and understand what my system is actually doing and I don't think I will be going back.  Now that my hardware is supported (though the configuration I have for my rt2500 chip in my Linksys WMP54g v4 fails on bootup half the time, though I even found out how to correct that when it does) and distros are getting easier to use, I think I have passed the point of no return.

Thank you again for your answer.  If anyone else has additional info I would certainly appreciate it too.

Offline

#4 2007-12-27 01:01:25

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Residual data leftover after package removal?

When you are confident with archlinux, try a flash drive install of arch-based Faunos.

It is a "live" flash install  of ~1GB of packages.

It boots in 45 secs into Kde display.

Check it on faunos forums....

Welcome to archlinux and happy new year!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2007-12-27 16:05:55

nDray
Member
From: Portugal
Registered: 2007-01-21
Posts: 143
Website

Re: Residual data leftover after package removal?

I think removing configuration files and so on is a good thing, but I do NOT recommend using -c switch.....
-n disables the creation of .pacsave files, wich are nothing but backups of configuration files.
-s removes dependencies, but only programs that depend on this one and weren't explicitly installed...
For example, wpa_supplicant is a dependency of networkmanager. If I just pacman -Sy networkmanager and then pacman -Rns networkmanager, wpa_supplicant is removed. But if I pacman -Sy networkmanager wpa_supplicant and then pacman -Rns networkmanager, wpa_supplicant remains untouched...
-c on the other hand, removes packages that depend on the ones we are removing. While this could be a good thing, sometimes it may cause some trouble, going up in the dependency tree and removing packages we didn't want it to... This will happen with packages we don't know to be dependencies of others, and not paying attention to what pacman outputs....

It's not a bad thing to remove packages with just -R, because pacman provies -e, which checks for files that were installed as dependencies of others that are currently not installed...

There are files that pacman will never remove, and these are personal configuration files, like those that go into your fome directory. (search for hidden (dot) folders.. Everything else remains clean, AFAIK...

Offline

#6 2007-12-27 17:10:47

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Residual data leftover after package removal?

nDray wrote:

and not paying attention to what pacman outputs....

That's really the only "danger" with using -c, and it's a pebcak issue. I use -Rsc all the time, never had a problem. Even if you inadvertently remove something, you can always pacman it back again.


I am a gated community.

Offline

#7 2007-12-27 21:31:25

nDray
Member
From: Portugal
Registered: 2007-01-21
Posts: 143
Website

Re: Residual data leftover after package removal?

yes, you can "pacman" it back again, but with -s you just lost all your configurations...
Of course if you pay attention to what pacman outputs and you see that a package that you need is going to be removed, you end up removing the previous with -Rns, or just Rs.... A few removals later you realise that -c either wants to remove stuff you probably need or ends up removing what -Rns would....
That's just me... I don't remove stuff that much,,, I was a (large) bit like tuneman, formatting windows every once in a while... Now I just don't install stuff I don't need...

Last edited by nDray (2007-12-27 21:31:50)

Offline

#8 2007-12-27 23:34:02

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Residual data leftover after package removal?

nDray wrote:

yes, you can "pacman" it back again, but with -s you just lost all your configurations...

That's not true. Only the -n flag removes config files.


I am a gated community.

Offline

#9 2007-12-28 11:50:03

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Residual data leftover after package removal?

Arch will not remove any configuration files created by the software, only files that were installed by pacman at install/upgrade time.

So no, pacman won't remove anything from gconf or ~/.appname.

_No_ package manager will do this as there's too much chance of losing user data.

Offline

#10 2008-01-04 13:19:42

HydroDiOxide
Member
Registered: 2007-10-06
Posts: 99

Re: Residual data leftover after package removal?

So there is a way to remove dependencies when removing (pacman -R) a package. What about ONLY removing unneeded dependencies (AFTER the package is removed... for those people who just found dependencies can be removed with a switch while pacman -R a package wink).


"Overspecialize and you breed in weakness..." Major Motoko Kusanagi

Offline

#11 2008-01-04 14:53:14

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Residual data leftover after package removal?

HydroDiOxide wrote:

So there is a way to remove dependencies when removing (pacman -R) a package. What about ONLY removing unneeded dependencies (AFTER the package is removed... for those people who just found dependencies can be removed with a switch while pacman -R a package wink).

pacman -Qe lists the orphans (dependencies not required by any other packages).
If you think the packages listed can be safely removed, just do :
pacman -Qe | cut -d ' ' -f1 | xargs pacman -R


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#12 2021-07-17 18:01:27

Pyntux
Member
From: Serbia
Registered: 2008-12-21
Posts: 391

Re: Residual data leftover after package removal?

pacman -Qe

for me list "linux" package (and much more), but that is not dependency big_smile


I do not speak English, but I understand...

Offline

#13 2021-07-17 20:03:33

seth
Member
Registered: 2012-09-03
Posts: 51,041

Re: Residual data leftover after package removal?

pacman -Qh wrote:

  -e, --explicit       list packages explicitly installed [filter]

And he didn't really say otherwise (but that it's not installed as a dependency)
And you responded to a 13 year old thread…
Don't necrobump.

Offline

#14 2021-07-17 21:24:55

Pyntux
Member
From: Serbia
Registered: 2008-12-21
Posts: 391

Re: Residual data leftover after package removal?

I did not see how old is thread, I am sorry big_smile

google search.... big_smile big_smile big_smile


I do not speak English, but I understand...

Offline

#15 2021-07-17 21:38:58

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: Residual data leftover after package removal?

Mod note: Closing...


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB