Date: Thu, 8 Aug 2002 15:39:16 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Andreas Wideroe Andersen <awand@pragma.no> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Cleaning the pkg_info list Message-ID: <20020808143916.GB80952@happy-idiot-talk.infracaninophi> In-Reply-To: <3D5270A6.30908@pragma.no> References: <3D5270A6.30908@pragma.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 08, 2002 at 03:22:46PM +0200, Andreas Wideroe Andersen wrote: > I've had a FreeBSD server running for some time and I've > occationally upgraded some of the programs. When I upgrade I go into > ports and issue a make install clean in the program's directory. > This leads to several listings under pkg_info: > > mod_php-4.0.3pl1 PHP4 module for Apache > mod_php4-4.1.2 PHP4 module for Apache > mod_php4-4.2.1_1 PHP4 module for Apache > mysql-client-3.22.32 Multithreaded SQL database (client) > mysql-client-3.23.40 Multithreaded SQL database (client) > mysql-server-3.23.40 Multithreaded SQL database (server) > ncftp-3.0b21 FTP replacement with advanced user interface > ncftp3-3.0.3 ftp replacement with advanced user interface > > I've got 2 questions: > > 1. I know if I do a pkg_delete <name.version> the program entry will > be deleted, but is there another way to clean this list (Ref. above > example)? pkg_delete of an older version of a port may well end up deleting files from the current version that happen to have the same name. Now, if you aren't bothered by having the odd redundant file around from older versions you can pretty much just delete the entries for the old ports out of /var/db/pkg --- this isn't fool proof by any means, so be prepared to do a lot of tidying up. Also it will lose the +REQUIRED_BY information. Note too that it's legitimate to have some multiple versions of certain packages installed side by side. For instance I have: happy-idiot-talk:/var/db/pkg:% pkg_info -I acroread-\* acroread-4.05 View, distribute and print PDF documents acroread-5.06 View, distribute and print PDF documents The alternative, cleaner, but much more long winded, way to do this sort of tidy-up is to pkg_delete *all* of the packages with multiple versions installed and then re-install just the latest versions. > 2. What is generally the best way to handle upgrades (also cleanings > like this)? As has been said many, many times before in this forum: install portupgrade cd /usr/ports/sysutils/portupgrade make install make clean rehash (if you're running tcsh or csh) To update all your installed ports to the latest versions: cd /usr/ports make update portsdb -Uu pkgdb -Fu portupgrade -Nia Really, you will wonder how you ever managed without it. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Tel: +44 1628 476614 Marlow Fax: +44 0870 0522645 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020808143916.GB80952>