Gentoo : How to unmerge all packages of a category

Thanks to eix !

Note : You must be root to unmerge packages

Start by installing emerge if you don’t have it : emerge eix

Run update-eix to create or update the eix database.

Now, this… trick should work for you too 😉

eix --nocolor -c -I -C dev-ruby | cut -d " " -f 2 | grep --color=never dev-ruby | xargs emerge --unmerge

Need some explanations ?

eix -c -I -C dev-ruby extracts all installed packages from dev-ruby

cut -d " " -f 2 extracts the full package name

grep --color=never dev-ruby filters the list ignoring eix overlays info and packages count (you could also use eix -c -*... to avoid that)

xargs takes the whole packages list and send it as a list of arguments to emerge --unmerge that will unmerge all listed packages in one shot !

Be Sociable, Share!

Tags: , ,


Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *