[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pipe help



Hall Stevenson said:

> dpkg --get-selections | grep gnome | awk '{print $1}' | xargs dpkg --purge

that should tell dpkg to --purge all packages that have 'gnome' in
them.

you may need to do --force-depends as if your removing installed packages
(opposed to removed but not purged packages in my previous post) there
may be other packages that need to be removed as well(or will break),
and dpkg will exit without deleting anything.

--force-depends can be dangerous, though in this case it shouldn't
be hard to recover from, gnome is hardly a critical piece of the system,
after running the command(if you run it ..) I would run apt-get update
and apt-get upgrade to figure out if anything is broken(chances are
something will be) and fix it before continuing.

and of course, run the command WITHOUT the last pipe to xargs to be sure
you know what your gonna be purging. I scared the piss outta myself
once(well, almost) by having awk print $2 instead of $1 and next thing
I saw was a screenfull of errors, luckily there was no packages called
'deinstall' so the result was harmless.

nate
(looking for jobs in all the wrong places..)




Reply to: