Date: Wed, 20 Sep 2000 15:35:26 -0600 From: Mike Morgan <mikemorgan@financialfusion.com> To: 'Mark Ovens' <marko@freebsd.org> Cc: "'freebsd-questions@freebsd.org'" <freebsd-questions@freebsd.org> Subject: RE: deleting all installed ports/pkgs Message-ID: <E3E1A9F2A227D311A1EC00902785C108C346EA@utasvexg001.financialfusion.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] The former is exactly what I want to do. tnx, Michael -----Original Message----- From: Mark Ovens [mailto:marko@freebsd.org] Sent: Wednesday, September 20, 2000 3:17 PM To: Mike Morgan Cc: 'freebsd-questions@freebsd.org' Subject: Re: deleting all installed ports/pkgs On Wed, Sep 20, 2000 at 02:58:44PM -0600, Mike Morgan wrote: > > > Is there a command which would delete all the ports on my system or > recursively delete all ports dependant on a particular port? > Do you mean delete all *installed* ports/packages or all the port skeletons under /usr/ports? If it's the former, and you are _absolutely_ _certain_ that you want to do this then try: % sh (if you are running csh/tcsh) $ su Password: # for i in `ls /var/db/pkg` > do > pkg_delete -f $i > done Note that the ``-f'' is needed because without it a port/package won't be deleted if a dependency is still installed. You will also see lots of warnings about this (and missing files) because you are removing them in alphabetical order. #include <disclaimer.h> I accept no responsibility for you screwing your system (e.g. XFree will probably get removed as well). > tnx, > Michael Morgan -- 4.4 - The number of the Beastie ________________________________________________________________ 51.44°N FreeBSD - The Power To Serve http://www.freebsd.org 2.057°W My Webpage http://ukug.uk.freebsd.org/~mark mailto:marko@freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message [-- Attachment #2 --] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12"> <TITLE>RE: deleting all installed ports/pkgs</TITLE> </HEAD> <BODY> <BR> <P><FONT SIZE=2>The former is exactly what I want to do.</FONT> </P> <P><FONT SIZE=2>tnx,</FONT> <BR><FONT SIZE=2>Michael</FONT> </P> <P><FONT SIZE=2>-----Original Message-----</FONT> <BR><FONT SIZE=2>From: Mark Ovens [<A HREF="mailto:marko@freebsd.org">mailto:marko@freebsd.org</A>]</FONT> <BR><FONT SIZE=2>Sent: Wednesday, September 20, 2000 3:17 PM</FONT> <BR><FONT SIZE=2>To: Mike Morgan</FONT> <BR><FONT SIZE=2>Cc: 'freebsd-questions@freebsd.org'</FONT> <BR><FONT SIZE=2>Subject: Re: deleting all installed ports/pkgs</FONT> </P> <BR> <P><FONT SIZE=2>On Wed, Sep 20, 2000 at 02:58:44PM -0600, Mike Morgan wrote:</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> Is there a command which would delete all the ports on my system or</FONT> <BR><FONT SIZE=2>> recursively delete all ports dependant on a particular port?</FONT> <BR><FONT SIZE=2>> </FONT> </P> <P><FONT SIZE=2>Do you mean delete all *installed* ports/packages or all the port</FONT> <BR><FONT SIZE=2>skeletons under /usr/ports?</FONT> </P> <P><FONT SIZE=2>If it's the former, and you are _absolutely_ _certain_ that you want</FONT> <BR><FONT SIZE=2>to do this then try:</FONT> </P> <P><FONT SIZE=2> % sh (if you are running csh/tcsh)</FONT> <BR><FONT SIZE=2> $ su</FONT> <BR><FONT SIZE=2> Password:</FONT> <BR><FONT SIZE=2> # for i in `ls /var/db/pkg`</FONT> <BR><FONT SIZE=2> > do</FONT> <BR><FONT SIZE=2> > pkg_delete -f $i</FONT> <BR><FONT SIZE=2> > done</FONT> </P> <P><FONT SIZE=2>Note that the ``-f'' is needed because without it a port/package won't</FONT> <BR><FONT SIZE=2>be deleted if a dependency is still installed. You will also see lots</FONT> <BR><FONT SIZE=2>of warnings about this (and missing files) because you are removing</FONT> <BR><FONT SIZE=2>them in alphabetical order.</FONT> </P> <P><FONT SIZE=2>#include <disclaimer.h></FONT> <BR><FONT SIZE=2>I accept no responsibility for you screwing your system (e.g. XFree</FONT> <BR><FONT SIZE=2>will probably get removed as well).</FONT> </P> <P><FONT SIZE=2>> tnx, > Michael Morgan</FONT> </P> <P><FONT SIZE=2>-- </FONT> <BR> <FONT SIZE=2>4.4 - The number of the Beastie</FONT> <BR><FONT SIZE=2>________________________________________________________________</FONT> <BR><FONT SIZE=2>51.44°N FreeBSD - The Power To Serve <A HREF="http://www.freebsd.org" TARGET="_blank">http://www.freebsd.org</A></FONT> <BR><FONT SIZE=2>2.057°W My Webpage <A HREF="http://ukug.uk.freebsd.org/~mark" TARGET="_blank">http://ukug.uk.freebsd.org/~mark</A></FONT> <BR><FONT SIZE=2><A HREF="mailto:marko@freebsd.org">mailto:marko@freebsd.org</A> <A HREF="http://www.radan.com" TARGET="_blank">http://www.radan.com</A></FONT> </P> <BR> <BR> <P><FONT SIZE=2>To Unsubscribe: send mail to majordomo@FreeBSD.org</FONT> <BR><FONT SIZE=2>with "unsubscribe freebsd-questions" in the body of the message</FONT> </P> </BODY> </HTML>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E3E1A9F2A227D311A1EC00902785C108C346EA>
