Re: pkg_deinstall: delete all packages installed, except for X, Y and Z

2009-06-05 Thread Valentin Bud
On Fri, Jun 5, 2009 at 6:13 AM, Fbsd1 fb...@a1poweruser.com wrote:

 Wojciech Puchar wrote:

  ignore errors about package can't be deleted because X, Y or Z requires
 it. it's exactly what you want.


  pkg_delete `cat /tmp/pkglist`  gives error 'no such package `cat
 /tmp/pkglist` installed


  for sure you used ' instead of `

   Yet that was the error. I did not know there was another type of quote
 key on the keyboard. The one used in the example is below the Esc key.

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org


The `` (below your escape key) do command substitution while '' do quoting.
This is just FYI :).

a great day,
v



-- 
network warrior since 2005
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pkg_deinstall: delete all packages installed, except for X, Y and Z

2009-06-04 Thread Fbsd1

Wojciech Puchar wrote:

Hello list.

I am trying to clean up a system with a LOT of cruft. Is there some
argument I could pass to pkg_deinstall that would result in delete
all packages installed, except for X, Y and Z (and obviously their
dependancies)?


just do

pkg_info |cut -f 1 -d   /tmp/pkglist
edit pkglist and delete lines X, Y and Z

do

pkg_delete `cat /tmp/pkglist`
rm /tmp/pkglist

ignore errors about package can't be deleted because X, Y or Z requires 
it. it's exactly what you want.



pkg_delete `cat /tmp/pkglist`  gives error 'no such package `cat 
/tmp/pkglist` installed

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pkg_deinstall: delete all packages installed, except for X, Y and Z

2009-06-04 Thread Wojciech Puchar
ignore errors about package can't be deleted because X, Y or Z requires it. 
it's exactly what you want.



pkg_delete `cat /tmp/pkglist`  gives error 'no such package `cat 
/tmp/pkglist` installed




for sure you used ' instead of `

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pkg_deinstall: delete all packages installed, except for X, Y and Z

2009-06-04 Thread Fbsd1

Wojciech Puchar wrote:
ignore errors about package can't be deleted because X, Y or Z 
requires it. it's exactly what you want.



pkg_delete `cat /tmp/pkglist`  gives error 'no such package `cat 
/tmp/pkglist` installed




for sure you used ' instead of `

  Yet that was the error. I did not know there was another type of 
quote key on the keyboard. The one used in the example is below the Esc key.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pkg_deinstall: delete all packages installed, except for X, Y and Z

2009-06-03 Thread Wojciech Puchar

Hello list.

I am trying to clean up a system with a LOT of cruft. Is there some
argument I could pass to pkg_deinstall that would result in delete
all packages installed, except for X, Y and Z (and obviously their
dependancies)?


just do

pkg_info |cut -f 1 -d   /tmp/pkglist
edit pkglist and delete lines X, Y and Z

do

pkg_delete `cat /tmp/pkglist`
rm /tmp/pkglist

ignore errors about package can't be deleted because X, Y or Z requires 
it. it's exactly what you want.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pkg_deinstall: delete all packages installed, except for X, Y and Z

2009-06-03 Thread Dan Naumov
Thanks a lot, this worked like a charm!

- Dan Naumov


On Wed, Jun 3, 2009 at 12:09 PM, Wojciech
Pucharwoj...@wojtek.tensor.gdynia.pl wrote:
 Hello list.

 I am trying to clean up a system with a LOT of cruft. Is there some
 argument I could pass to pkg_deinstall that would result in delete
 all packages installed, except for X, Y and Z (and obviously their
 dependancies)?

 just do

 pkg_info |cut -f 1 -d   /tmp/pkglist
 edit pkglist and delete lines X, Y and Z

 do

 pkg_delete `cat /tmp/pkglist`
 rm /tmp/pkglist

 ignore errors about package can't be deleted because X, Y or Z requires it.
 it's exactly what you want.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org