Exclude packages from pkg upgrade

How can I exclude packages when doing pkg ugrade?

I have some ports installed with different options. They are always overwritten.
Have you tried pkg-lock(8)?
pkg lock is used to lock packages against reinstallation, modification or deletion. pkg unlock unlocks the named packages. Either variant only has an effect on currently installed packages. Consequently it is impossible to block installation of a new package by using this mechanism, unless such an installation implies updating a locked package.
It doesn't make sense to lock the port, as I can't deinstall it when upgrading by source (pkg_replace)
I want to upgrade certain ports only by source because I have nonstandard options.
To avoid that pkg upgrades them I have to lock them. To upgrade via source I have to unlock them and then lock them again?
Just for clarification; I see the OP uses pkg(8). But replies appear to be from the older pkg-tools (pkg-) note the dangling hyphen. It's my understanding, and experience, they're different. Are they somehow the same, in the current context?



The man pages for pkg(8) are shown with dashes. For example, pkg info is covered by pkg-info(8).

At this point, anyone still using the old pkg_* programs (with an underscore) should be planning on converting to pkg(8) soon. The old stuff will be deprecated in September.
wblock@ said:
The old stuff will be deprecated in September.
Yes. I've heard. I have a real issue with that. But having already addressed that on the stable@ list. I won't SPAM this thread with it. But rather. Take it up in the form of a pr(). :)

Thanks for the clarification, @wblock@.

Last edited by a moderator: