From owner-freebsd-questions@FreeBSD.ORG Fri Feb 18 15:26:04 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17E5716A4CE for ; Fri, 18 Feb 2005 15:26:04 +0000 (GMT) Received: from internet.potentialtech.com (h-66-167-251-6.phlapafg.covad.net [66.167.251.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E1C943D45 for ; Fri, 18 Feb 2005 15:26:03 +0000 (GMT) (envelope-from wmoran@potentialtech.com) Received: from localhost (pa-plum-cmts1e-68-68-113-64.pittpa.adelphia.net [68.68.113.64]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by internet.potentialtech.com (Postfix) with ESMTP id 89BDB69A71; Fri, 18 Feb 2005 10:26:01 -0500 (EST) Date: Fri, 18 Feb 2005 10:26:00 -0500 From: Bill Moran To: BSD todoo Message-Id: <20050218102600.400ed0f3.wmoran@potentialtech.com> In-Reply-To: References: Organization: Potential Technologies X-Mailer: Sylpheed version 1.0.0rc (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="Signature=_Fri__18_Feb_2005_10_26_00_-0500_zizbdFyOXN4RygnH" cc: freebsd-questions@freebsd.org Subject: Re: Removing old perl version from system X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2005 15:26:04 -0000 --Signature=_Fri__18_Feb_2005_10_26_00_-0500_zizbdFyOXN4RygnH Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit BSD todoo wrote: > Hello again ! > > I have all these version of perl installed on my system (FreeBSD 5.2.1) > : 5.6.1 5.6.2 5.8.5 5.8.6 > > I would like to get rid of the old versions and only keep 5.8.6 how do > I have to do that ?? > > The reason why I would like to do that is that when I upgrade the port > tree I found that modules sometimes get confused and switch to the old > 5.6.1 module !! I recently did something similar to this for a client. In my case, there were only two perls installed (5.6.? and 5.8.?) In my case, I was able to easily deinstall perl 5.8. I then used portupgrade with the -o option to replace perl 5.6 with perl 5.8. It seems a little roundabout to deinstall 5.8, only to reinstall it, but it got the job done. I used portupgrade with the -f option to force all software dependent on perl to be rebuilt. After that, all worked, and I only had perl5.8. I do remember one glitch: somewhere during process, the system reverted to using perl 5.005 (this was FreeBSD 4.11) and I had to manually 'use.perl port' to fix that. Not a big deal, except I had to repeat a number of steps because I didn't realize it had happened. Watch for this using 'perl -v' between steps ... but it shouldn't happen on FreeBSD 5.x. In your case, I expect it will be a little more complicated. If it were me, I would start out by deinstalling everything not necessary to the system's operation, as well as anything that's perl-dependent and won't be difficult to reinstall (some packages require a lot of work, others are a breeze ...) I would then see if I could deinstall perl 5.6.1 and perl 5.8.5. If that worked, I'd be back to where I was on the other system, and I could simply remove 5.8, and then do 'portupgrade -o lang/perl5.8 perl-5.6.2' (please note that command is from memory, and may not be perfectly correct. Once I had it down to just perl 5.8, I used 'portupgage -fr perl'. This tells the system to rebuild/reinstall all packages that depend on perl, whether they need upgrade or not. Note that this is probably overkill, but I'd rather over than under. Be wary that some of those portupgrade commands can take a LONG time, and if you have some things you don't want to upgrade, they could bite you. Liberal use of the -n option to portupgrade is recommended to ensure that it's not doing something you don't want it to do. If you get stuck with getting things deinstalled, you can either deinstall all packages dependent on them, or use the -f option to force the operation. The former is more time-consuming, the latter can be risky. Do this during non-production time, as it's likely that many perl apps will have trouble during the process and will need restarted to work again after the process is finished. > What are the pros and cons of doing such an uninstall ?? Pros are that the system will be easier to maintain. You're system will have less programs with vulnerabilities installed, and will use less disk space. Cons are that you'll spend less time working with this system, and it's less likely to get cracked, so if you get paid by the hour, you'll make less $$. Good luck. -- Bill Moran Potential Technologies http://www.potentialtech.com --Signature=_Fri__18_Feb_2005_10_26_00_-0500_zizbdFyOXN4RygnH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCFgkIYOm/CGAEZUARArZrAKCZUmw+g8fqAnhNGES6Wd76Xe86mQCggGwz 0txuah+qJkNUjbqiHUuzsqg= =wVW9 -----END PGP SIGNATURE----- --Signature=_Fri__18_Feb_2005_10_26_00_-0500_zizbdFyOXN4RygnH--