Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Remove a group of packages
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
cybrjackle
Apprentice
Apprentice


Joined: 09 Jan 2003
Posts: 248
Location: USA

PostPosted: Sun Feb 18, 2007 3:07 am    Post subject: HOWTO: Remove a group of packages Reply with quote

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
View user's profile Send private message
Phenax
l33t
l33t


Joined: 10 Mar 2006
Posts: 972

PostPosted: Sun Feb 18, 2007 4:16 am    Post subject: Reply with quote

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
View user's profile Send private message
vandien
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2006
Posts: 137

PostPosted: Sun Feb 18, 2007 5:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum