From owner-freebsd-questions@FreeBSD.ORG  Fri Jan 14 17:31:31 2005
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
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 AA24116A4CE
	for <FreeBSD-Questions@FreeBSD.ORG>;
	Fri, 14 Jan 2005 17:31:31 +0000 (GMT)
Received: from S3.cableone.net (smtp3.cableone.net [24.116.0.229])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3270B43D41
	for <FreeBSD-Questions@FreeBSD.ORG>;
	Fri, 14 Jan 2005 17:31:31 +0000 (GMT)
	(envelope-from v.velox@vvelox.net)
Received: from vixen42.local.lan (unverified [24.119.123.89]) 
	by S3.cableone.net (CableOne SMTP Service S3) with ESMTP id 7330387 
	for multiple; Fri, 14 Jan 2005 10:48:09 -0700
Date: Fri, 14 Jan 2005 11:30:27 -0600
From: Vulpes Velox <v.velox@vvelox.net>
To: Erik Norgaard <norgaard@locolomo.org>
Message-ID: <20050114113027.0feb65f5@vixen42.local.lan>
In-Reply-To: <41E7B573.6020202@locolomo.org>
References: <20050114115346.19233.qmail@gawab.com>
	<41E7B573.6020202@locolomo.org>
X-Mailer: Sylpheed-Claws 0.9.13 (GTK+ 1.2.10; i386-portbld-freebsd5.3)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-IP-stats: Incoming Last 1, First 44, in=90, out=0, spam=0
X-External-IP: 24.119.123.89
X-Abuse-Info: Send abuse complaints to abuse@cableone.net
cc: Emon <jadukor@gawab.com>
cc: FreeBSD Questions <FreeBSD-Questions@FreeBSD.ORG>
Subject: Re:
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>,
	<mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>,
	<mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Jan 2005 17:31:31 -0000

On Fri, 14 Jan 2005 13:05:07 +0100
Erik Norgaard <norgaard@locolomo.org> wrote:

> Emon wrote:
> > But now some of the packages were complaining that an older
> > version is installed & I had no idea how to upgrade these
> > packages.
> > 
> > So in my blind rage I did "pkg_add -vf" on all packages
> > including mc.
> > 
> > Now mc works but I cannot uninstall it or any of the packages. I
> > will show you an example.
> > 
> > 
> > # pkg_add mc-4.6.0_13.tgz
> > pkg_add: package 'mc-4.6.0_13' or its older version already
> > installed
> > # pkg_delete mc-4.6.0_13.tgz
> > pkg_delete: no such package 'mc-4.6.0_13.tgz' installed
> > #
> > 
> > Now how on earth is that possible?? First it says "older version
> > already installed" & than it says "no such package
> > 'mc-4.6.0_13.tgz' installed".
> 
> Yeah, maybe it is not completely clear. When you use pkg_add you
> give it a tgz file containing the package. When you want to delete
> it, you must give the package name, usually the same but without the
> tgz extension.
> 
> Some tricks: It is often helpfull to search for what version of a 
> package is installed when you get that kind of error:
> 
> # pkg_info -x mc
> 
> the -x is regular expresion, so all packages containing mc will
> match, in this case mc-4 is probably better. You can also use
> pkg_delete with -x option, but be carefull!
> 
> When using packages, make sure you download packages for the same 
> release, this way you should not get such errors as "older version 
> installed".

A tool you may find handy is portupgrade. It will take care of a nice
amount of stuff automatically.