You are not logged in.

#1 2013-08-15 06:20:53

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 511

Cleaning the system from remaining unowned files

After removing some packages we notice that some files (be it cache or configuration) remain in the system consuming space.
How can we generate a full list of these unowned or garbage files still remaining on the system?

Offline

#2 2013-08-15 11:13:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Cleaning the system from remaining unowned files

How exactly did you remove the packages?

The files created after you installed the package have to removed manually, because pacman doesn't know about them, they don't exist in the package you download and install.

Offline

#3 2013-08-15 11:38:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,549
Website

Re: Cleaning the system from remaining unowned files

There are some tools/scripts floating around that will find untracked files - see the filesystem manual intervention steps for an example of finding such files in /{usr/,}{s,}bin/ and extended it to include other directories.  This will give you a list of *all* untracked files, then you can delete those that you are not still using.

This would be completely useless, though, for your home directory as none of these files should be tracked.  Just look through some of the dot-directories (~/.local/* ~/.config), most of the subdirectories have names matching package or program names.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2013-08-16 06:32:59

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 511

Re: Cleaning the system from remaining unowned files

Yep, thought there is some toul out there which actually does this for me smile , @Karol I normaly use pacman -Rd or yaourt -Rd, does this remove everything except the .cache files on home directory?

I think the last package left also some files in /usr or somewhere else, I used locate search for the remainings but I'm petty sure it wasn't only my home...
Would be nice though to have a tool handle this also...

Offline

#5 2013-08-16 11:17:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,549
Website

Re: Cleaning the system from remaining unowned files

Nooo, -Rd is probably a bad idea.  That could remove a package that is required by some other package, thus breaking the other package.

And it does not get rid of any of the files you are talking about: that would be the 'n' flag - it's in the man page.  `pacman -Rn pkg` will remove the package and not keep copies of any modified config files, but it may leave orphaned packages that were installed as dependencies of pkg and are no longer needed.  I always use `pacman -Rsn pkg` for removing something I installed.

But in anycase, pacman will never remove any of the files Karol refers to (which could be anywhere in your filesystem - though /etc/ will be the most likely place), nor anything in your home directory.  Never.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2013-08-16 13:14:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Cleaning the system from remaining unowned files

r0b0t, what made you think that 'pacman -Rd' is the right way to remove packages and their configs? Have you read 'pacman -Rh' and the man page?

Offline

#7 2013-08-17 10:26:37

r0b0t
Member
From: /tmp
Registered: 2009-05-24
Posts: 511

Re: Cleaning the system from remaining unowned files

aheeeyyy, okay , my fault, and yes pacman -Rsn it's the best idea however there is no solution it appears to remove also cache files although there may be some tools out there wich I don't know.
Thanks anyway Trilby/Karol smile

Offline

#8 2013-08-17 10:28:59

flipper T
Member
Registered: 2012-09-14
Posts: 419

Re: Cleaning the system from remaining unowned files

pacman -Sc ?


If I'm curt with you it's because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the [censored] car. -The Wolf

Offline

#9 2013-08-17 10:33:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Cleaning the system from remaining unowned files

flipper T wrote:

pacman -Sc ?

I think he meant ~/.cache and similar.

Offline

Board footer

Powered by FluxBB