On Sunday 25 June 2006 23:12, krgn wrote:
> I know this must have been asked a few times, but I need to quick and
> can't search a lot for info on the net. I would like to remove, say KDE
> and GNOME from a system with all the packages they come with, and would
> like to find a cmd-line option to emerge that spits out the packages
> depending on KDE and GNOME. Could anyone tell me whats the best way to
> approach this?

There is no easy way to check what depends on any kde or gnome aplication or 
library before unmerging them.. If you have eix* installed you should be able 
to get something decent out of this though:

# eix -IC gnome --format '<category>/<name>' | grep -vr '^$\|^\[\|^Found' | \
        while read pkg; do equery depends "$pkg"; done | grep -v ^gnome

That should show packages that are not in the gnome categories but which 
depend on something from the gnome categories. Likewise for kde:

# eix -IC kde --format '<category>/<name>' | grep -vr '^$\|^\[\|^Found' | \
        while read pkg; do equery depends "$pkg"; done | grep -v ^kde

-------------------------------------------------------------------------------------------------

To unmerge everything in the kde-{base,misc} categories you may do (be 
careful - this does not check if anything depends on those packages):

# cd /var/db/pkg && emerge --unmerge --ask --verbose kde-{base,misc}/*

To unmerge everything in the gnome-{base,extra} categories you may do:

# cd /var/db/pkg && emerge --unmerge --ask --verbose gnome-{base,extra}/*

Both of those commands remove things without checking if any packages depend 
on them.

When done removing those you should use depclean. Make sure to read the 
WARNING and inspect what it will remove carefully to make sure that it does 
not remove something you want to keep. This shows packages that are no longer 
required by any packages in your world file.

# emerge --depclean -vp

When you are done with that it is important that you run revdep-rebuild to 
repair any broken dependencies.

# revdep-rebuild -i -p -- -v
# revdep-rebuild -- -v

-------------------------------------------------------------------------------------------------

* If you do not have eix I would recommend the following. eix is really 
useful:

# emerge -va eix && update-eix

-- 
Bo Andresen

Attachment: pgpcTBALwFso2.pgp
Description: PGP signature

Reply via email to