View previous topic :: View next topic |
Author |
Message |
cybrjackle Apprentice
Joined: 09 Jan 2003 Posts: 248 Location: USA
|
Posted: Sun Feb 18, 2007 3:07 am Post subject: HOWTO: Remove a group of packages |
|
|
I'm normally a gnome/e17 user but wanted to play around with kde/xfce a little, when it came time to emerge -e world I decided to trim the fat and get rid of them to save some cpu cycles.
Anyway, I've basically do the same thing to remove tables from databases, so I used the same method here to get rid of kde and xfce. Thought it might be helpful. Or maybe there is an easier way and someone can chime in.
You might want to cat/view/more/less the file and make sure nothing you like is being blown out.
Code: |
# equery l |grep xfce > ~/remove_xfce
# for X in $(cat remove_xfce)
> do
> emerge -C $X
> done
|
Code: |
# equery l |grep kde > ~/remove_kde
# for X in $(cat remove_kde)
> do
> emerge -C $X
> done
|
ciao, |
|
Back to top |
|
|
Phenax l33t
Joined: 10 Mar 2006 Posts: 972
|
Posted: Sun Feb 18, 2007 4:16 am Post subject: |
|
|
Using your method, it would be easier to do a
Code: | cat remove_xfce | xargs emerge -C | xargs takes arguments that are newlines into spaced arguments..
You could write a quick script for it, of course.. this was done in a minute or two so feel free to improvise..
Code: |
if [[ $1 == "" ]]; then
echo Please specify a keyword as the first argument.
exit
fi
proglist=`equery l | grep $1`
echo $proglist
echo -e "\n\nRemove packages?: [y/n]"
read answer
if [ $answer == "y" ]; then
emerge -Cp $proglist
else
exit
fi
|
|
|
Back to top |
|
|
vandien Tux's lil' helper
Joined: 03 May 2006 Posts: 137
|
Posted: Sun Feb 18, 2007 5:33 am Post subject: |
|
|
This looks like it would work for the most part, except that it misses some dependencies not necessarily part of the main set of packages. I used to be scared of --depclean, but recently started using it with great success. I just remove unwanted packages from "/var/lib/portage/world" and then run:
Code: | emerge --depclean -p
(if everything looks good)
emerge --depclean
revdep-rebuild -p
revdep-rebuild |
I used this method recently to "upgrade" from gnome to gnome-light and to also clean up random packages installed once and forgotten about. Just remember to check the depclean packages and "emerge -n" anything that you want to keep. |
|
Back to top |
|
|
|