http://www.linuxquestions.org/questions/showthread.php?s=&threadid=355556
> i have installed kde ,but there r so many things i dont want. for example , > games. how do i remove kde games individually on command prompt.
To remove: apt-get remove kpoker To remove with conf files: apt-get --purge remove kpoker
> now, if i have to remove whole group called 'Games' instead of individual > game, how do i do this using command prompt.
One way (there are many) would be to run the following
code:
dpkg -l | grep game | awk '{ print $2 }' > outfile
apt-get --purge remove `cat outfile`
mjrich 08-21-2005
> > dpkg -l | grep game | awk '{ print $2 }' > outfile > > Only gets those w. game in the name and/or description. > What's asked for is the *section*.
Fair enough…
dpkg-query -W --showformat '${Section}\t${Package}\n' | grep ^games | awk '{ print $2 }' > outfile
mjrich 08-21-2005