Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2001 15:42:50 -0400
From:      parv <parv_@yahoo.com>
To:        Andreas Klemm <andreas@FreeBSD.ORG>
Cc:        abram olson <dacia_icarus@yahoo.com>, freebsd-stable@FreeBSD.ORG
Subject:   Re: of shell, find, and (g)xargs (Re: mass uninstall all ports?)
Message-ID:  <20010716154250.A13364@moo.holy.cow>
In-Reply-To: <20010716084129.A504@titan.klemm.gtn.com>; from andreas@FreeBSD.ORG on Mon, Jul 16, 2001 at 08:41:29AM %2B0200
References:  <20010712182844.A26646@moo.holy.cow> <20010712224021.95596.qmail@web13502.mail.yahoo.com> <20010712191017.B29406@moo.holy.cow> <20010716084129.A504@titan.klemm.gtn.com>

next in thread | previous in thread | raw e-mail | index | archive | help

i forgot to include this message in my last reply, so bear w/ me...


on Jul 16 11:29, i got this from Andreas...
> On Thu, Jul 12, 2001 at 07:10:17PM -0400, parv wrote:
> > ...in the end both will do the same thing: remove/delete all the
> > installed software as listed in /var/db/pkg. if you go the 'pkg_info' 
> > route, you should add '-f' and or '-d' flag. 
> > 
> > if pkg_delete/xargs/shell complain that 'pipe broken', 'too many 
> > arguments', or some such, then you can try this...
> > 
> > # find /var/db/pkg -type d -execdir pkg_delete -fd {} \;
> 
> This forks a pkg_delete command for every port found, thats expensive.
> Why not use find/xargs combination in this case as well ?
> 
> ( cd /var/db/pkg; find . -type d | xargs pkg_delete )
> 
> 	Andreas ///
> 


to give everybody else the right context, my last message was a reply 
to abe, omitted from the above andreas' quoted message...


on Jul 12 18:48, i got this from abram...
> I have updated the ports using cvsup.  So, this:
> 
> cd /var/db/pkg && pkg_delete -fd *
> 
> will remove all the packages and ports that are
> installed?
> 
> I really want to understand what I'm doing here ;-)
> 
> Another person suggested I do:
> 
> pkg_info | cut -d\  -f1 | xargs pkg_delete
> 
> what is the difference between what these two commands
> will do?
> 
> Abe


andreas, your 'find+xargs' script is basically same as 
'pkg_info+cut+xargs', as quoted by abe above, as far as 'xargs'
is concerned. so the 'too many arguments' problem is still exists.

thus was the reason of using 'find ... -execdir ...'; i suppose i 
should have noted the expense instead of intentionally omitting it.

-- 
 so, do you like word games or scrabble?
	 - parv

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010716154250.A13364>