Gentoo Archives: gentoo-user

From: Jorge Peixoto de Morais Neto <please.no.spam.here@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] cruft in /etc. How to clean in out.
Date: Wed, 26 Nov 2008 15:10:57
Message-Id: 38af3d670811260710p40aa6fa7sd6a0c7371f3af948@mail.gmail.com
In Reply to: Re: [gentoo-user] cruft in /etc. How to clean in out. by Dirk Heinrichs
1 > Maybe you should search the forums for "cruft". I remember Ed (?) Catmur once
2 > posted a script or something there.
3 I use a script named findcruft regularly (I think it is an improved
4 version of Ed Catmur's product; I'll check when I get home). It works
5 by finding all files on the filesystem (avoiding areas such as /proc,
6 /sys/ /dev/, /home, and such) and comparing that to the files managed
7 by Portage. The list of orphaned files is full of false positives,
8 caused by, for example, packages that create files outside the
9 knowledge of portage (I think many eselect modules do this for
10 example). It tries to diminish the "false positives" problem by having
11 a database of packages and files created by using said packages.
12
13 This database of course cannot be complete, and unfortunately it seems
14 to be very outdated. I would love to see more maintenance of this
15 script and, more importantly, the database.
16
17 In the current state, the list of orphaned files is huge, with a good
18 part of it probably being false positives. Since I don't want to move
19 a file without being sure it is cruft, I can only read that list and
20 delete the few files that I know about and am sure are cruft. I also
21 run the script regularly and save the results; each time I run the
22 script I compare the list with the previous one. I normally run the
23 script after I unmerge some packages.
24
25 In the end, if you want a clean system it seems you either have to
26 reformat every couple of years, or you have to be a walking
27 encyclopedia knowing the origin of every file in the huge list that
28 findcruft outputs so you know if they are cruft or not.
29
30 Sad. In my opinion, this problem needs to be addressed.
31
32 --
33 Software is like sex: it is better when it is free - Linus Torvalds