On Fri March 19 2010 12:55:47 Mike Viau wrote:
> I was looking for a way to purge or remove all the packages that were
> installed on a Debian system after the initial (bare bone) minimal system
> installation. I have searched on Google for "How to reduce a Debian system
> to a base system" but it seems like the topic of interest was to reduce the
> memory consumption of the installed system, which is not my consern.
>
> In essence I would like to revert my system back to a freshly installed
> state, without reinstalling. Ultimatly is this possible?

Assuming your bare bones --get-selections file is called bbs:

dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install") print $1}' <bbs | 
sort) <(dpkg --get-selections | awk '{if ($2=="install") print $1}' | sort))  

Remove "--dry-run" at your own peril once you're happy with the proposed
actions.

You may need to run it a couple or three times but that should do it.

--Mike Bird


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201003191448.03134.mgb-deb...@yosemite.net

Reply via email to