1 |
Beso <givemesugarr@×××××.com> posted |
2 |
d257c3560711260753u4406ae26m88f6f53164332ebb@××××××××××.com, excerpted |
3 |
below, on Mon, 26 Nov 2007 16:53:19 +0100: |
4 |
|
5 |
> i'd like to do a thorough clean of my system, since i still get some |
6 |
> problems with orphaned and stale files. is there a script or something |
7 |
> that could help me do this?! i usually do manual remove when i remove a |
8 |
> package from the system but this is getting more and more time losing. |
9 |
> so if there's an automated way i'd be glad to try it out. |
10 |
> |
11 |
> thanks in advance for your replies. |
12 |
|
13 |
Current portage (~ anyway, stable isn't what I'd call "current" for many |
14 |
packages, so I run ~arch by default) now has FEATURES=unmerge-orphans. |
15 |
Read about it in the make.conf manpage. That helps with files that were |
16 |
part of the old package but were changed since merge, as long as they |
17 |
aren't config-protected as well. This feature may eventually be enabled |
18 |
by default, but it hasn't been yet, because there are some files that |
19 |
portage didn't formerly track that it is now, that would be removed with |
20 |
this feature enabled in some circumstances. |
21 |
|
22 |
That'll help with new files, but it won't help you clean up old cruft |
23 |
that isn't owned by anything now, or config-protected stuff as in /etc. |
24 |
|
25 |
There's also a python script called localpurge (aka orphans.py) |
26 |
available, written by Alec Warner (one of the portage devs), that can |
27 |
help. As with emerge --depclean and similar functions, use it with |
28 |
caution, in this case meaning do NOT run it as root on /, with the force/ |
29 |
remove/recurse options all three! Used with the default --scan option |
30 |
(and --recurse if desired), however, it simply prints a list that you can |
31 |
act upon, or you can use --remove WITHOUT using --force, and get a prompt |
32 |
for each file. However, as with emerge --depclean and revdep-rebuild, I |
33 |
strongly prefer getting the list and then doing the remerges/removals/ |
34 |
whatever manually. Run it with the --help option for usage instructions. |
35 |
|
36 |
http://dev.gentoo.org/~antarus/orphans.py |
37 |
|
38 |
One hint on it. It doesn't say so in the usage, but if recursive is set, |
39 |
it walks the entire tree below the dirs it is given -- and takes quite |
40 |
some time doing it. Thus, pointing it at / on a typical system is a |
41 |
waste, since you get all of /home and the like listed too. It's more |
42 |
useful to feed it a list of dirs, /bin /sbin /var /usr /opt /etc, and let |
43 |
it look below them. It'll still list a lot of "extra" stuff, but at |
44 |
least you won't be loading it down with /root and /home, and it'll be |
45 |
faster as a result, too. It'll still take awhile to run, tho... |
46 |
|
47 |
-- |
48 |
Duncan - List replies preferred. No HTML msgs. |
49 |
"Every nonfree program has a lord, a master -- |
50 |
and if you use the program, he is your master." Richard Stallman |
51 |
|
52 |
-- |
53 |
gentoo-amd64@g.o mailing list |