1 |
On Sunday 25 June 2006 23:12, krgn wrote: |
2 |
> I know this must have been asked a few times, but I need to quick and |
3 |
> can't search a lot for info on the net. I would like to remove, say KDE |
4 |
> and GNOME from a system with all the packages they come with, and would |
5 |
> like to find a cmd-line option to emerge that spits out the packages |
6 |
> depending on KDE and GNOME. Could anyone tell me whats the best way to |
7 |
> approach this? |
8 |
|
9 |
There is no easy way to check what depends on any kde or gnome aplication or |
10 |
library before unmerging them.. If you have eix* installed you should be able |
11 |
to get something decent out of this though: |
12 |
|
13 |
# eix -IC gnome --format '<category>/<name>' | grep -vr '^$\|^\[\|^Found' | \ |
14 |
while read pkg; do equery depends "$pkg"; done | grep -v ^gnome |
15 |
|
16 |
That should show packages that are not in the gnome categories but which |
17 |
depend on something from the gnome categories. Likewise for kde: |
18 |
|
19 |
# eix -IC kde --format '<category>/<name>' | grep -vr '^$\|^\[\|^Found' | \ |
20 |
while read pkg; do equery depends "$pkg"; done | grep -v ^kde |
21 |
|
22 |
------------------------------------------------------------------------------------------------- |
23 |
|
24 |
To unmerge everything in the kde-{base,misc} categories you may do (be |
25 |
careful - this does not check if anything depends on those packages): |
26 |
|
27 |
# cd /var/db/pkg && emerge --unmerge --ask --verbose kde-{base,misc}/* |
28 |
|
29 |
To unmerge everything in the gnome-{base,extra} categories you may do: |
30 |
|
31 |
# cd /var/db/pkg && emerge --unmerge --ask --verbose gnome-{base,extra}/* |
32 |
|
33 |
Both of those commands remove things without checking if any packages depend |
34 |
on them. |
35 |
|
36 |
When done removing those you should use depclean. Make sure to read the |
37 |
WARNING and inspect what it will remove carefully to make sure that it does |
38 |
not remove something you want to keep. This shows packages that are no longer |
39 |
required by any packages in your world file. |
40 |
|
41 |
# emerge --depclean -vp |
42 |
|
43 |
When you are done with that it is important that you run revdep-rebuild to |
44 |
repair any broken dependencies. |
45 |
|
46 |
# revdep-rebuild -i -p -- -v |
47 |
# revdep-rebuild -- -v |
48 |
|
49 |
------------------------------------------------------------------------------------------------- |
50 |
|
51 |
* If you do not have eix I would recommend the following. eix is really |
52 |
useful: |
53 |
|
54 |
# emerge -va eix && update-eix |
55 |
|
56 |
-- |
57 |
Bo Andresen |