1 |
The following lines creates an auditWorldFile.log log file which will |
2 |
show packages requires by other packages, so theones you can safely |
3 |
remove. |
4 |
|
5 |
|
6 |
#!/bin/bash |
7 |
|
8 |
n=`wc -l /var/lib/portage/world|awk '{ print $1 }'`; |
9 |
for i in `seq 1 $n`;do |
10 |
pkg=`cat /var/lib/portage/world|head -n$i|tail -n1`; |
11 |
echo -e "Packages depending on $pkg." >> /tmp/auditWorldFile.log |
12 |
equery d $pkg >> /tmp/auditWorldFile.log |
13 |
echo -e "" >> /tmp/auditWorldFile.log |
14 |
done; |
15 |
|
16 |
|
17 |
2010/12/8 Johannes Kimmel <johannes.kimmel@×××.de>: |
18 |
> On 12/08/2010 12:23 PM, Helmut Jarausch wrote: |
19 |
>> |
20 |
>> Hi, |
21 |
>> |
22 |
>> does anybody know about an easy method to remove all entries from |
23 |
>> /var/lib/portage/world |
24 |
>> which would have been pulled in anyway |
25 |
>> even if they were not contained in world. |
26 |
>> |
27 |
>> My current attempt would be to write a script |
28 |
>> which executes emerge -vpc on each entry in world. |
29 |
>> If it wouldn't be removed it's obsolete in world. |
30 |
>> |
31 |
>> Unfortunately this has to be done in several rounds. |
32 |
>> |
33 |
>> Many thanks for a hint, |
34 |
>> Helmut. |
35 |
>> |
36 |
>> |
37 |
> |
38 |
> Hi, |
39 |
> |
40 |
> I wanted to add, that a minimal world in my opinion isn't always what you |
41 |
> want. For example in the time I searched for a suitable window manager for |
42 |
> me I did a lot of depclean these days and accidently removed the xserver. |
43 |
> There was no harm done, but I figured, that my world file should contain all |
44 |
> packages, that should never removed automatically unless I want to. This way |
45 |
> there is a little less danger involved using depclean. So this type of work |
46 |
> might only be done by hand. |
47 |
> |
48 |
> Johannes Kimmel |
49 |
> |
50 |
> |