Subject: Re: how to update a pkg marked not for deletion?
To: Mark E. Perkins <>
From: Tobias Nygren <>
List: pkgsrc-users
Date: 07/17/2007 14:45:07
On Sun, 15 Jul 2007 15:13:34 -0400
"Mark E. Perkins" <> wrote:

> Having updated pkg_install, I thought I might as well update the other
pkgtools that changed recently (pax, tnftp).  But they're marked as not
> deletion, so they cannot be deleted. :-)  None of the suggestions in the
> messages (pkg_delete, make {update,replace}) works.  So how *does* one
> about updating them?
> Thanks,
> Mark

As said before in the thread, re-bootstrapping is probably the safest way.
But I usually do something like this (bmake used as an example):

# build new version
cd /usr/pkgsrc/devel/bmake
# make pkgsrc forget about the bmake pkg
rm -r /var/db/pkg/bmake*
# install new version
/usr/pkg/bin/bmake install
# restore "not for deletion" state
cd /var/db/pkg/bmake*
date > +PRESERVE

It should work in most cases, I think.