Bulk package delete

 | FreeBSD | 0 Comments | 0 TrackBacks

This was the dilemma I found myself in today. I wanted to remove all of the Gnome stuff from my FreeBSD installation in order to make a clean start by reinstalling it all over again.

However, what's a poor soul to do when 'pkg_info | grep -i gnome | wc -l' results in a long list of packages (36) that all need to be removed safely first?

# pkg_info | awk '/gnome/ { print $1; system("pkg_delete " $1); }'

That's just one possible way of achieving this, maybe not the best but it works anyway.

No TrackBacks

TrackBack URL: http://www.kiffingish.com/cgi-bin/mt/mt-tb.cgi/17

Leave a comment

Recent Entries

Stupid light-pole
Damn. I bashed in the left side of my car against that stupid light-pole while backing out of the ... »
Enjoy life
The man standing next to me was wearing a fancy suit and carrying a leather briefcase in his right ... »
Gale-force winds
"The true (golf) pilgrim wanders off to the outlying, the more humble and obscure courses. For it is on ... »
Secret powers
The front nine was quite a display of supernaturally and (almost) perfectly consistent golfing gusto: Par, par, par, par, ... »
No more winter greens
The cool, windy and grayish afternoon calls me onward. It's drizzling on my windshield but I do not care. ... »