> Date: Fri, 19 Mar 2010 14:48:02 -0700 <mgb-deb...@yosemite.net> wrote:
> 
> 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
> 

My output with the suggestion above.


debian:~# dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install") print 
$1}' < debian-5.04-base-selections | sort) < (dpkg --get-selections | awk '{if 
($2=="install") print $1}' | sort))
bash: command substitution: line 1: syntax error near unexpected token `('
bash: command substitution: line 1: `join -v2 <(awk '{if ($2=="install") print 
$1}' < debian-5.04-base-selections | sort) < (dpkg --get-selections | awk '{if 
($2=="install") print $1}' | sort)'
dpkg: --purge needs at least one package name argument

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].

Options marked [*] produce a lot of output - pipe it through `less' or `more' !
debian:~# 

> 
> -- 
> 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
> 
                                          
_________________________________________________________________
IM on the go with Messenger on your phone
http://go.microsoft.com/?linkid=9712960

Reply via email to