# pkg lock does not work



## dave (Jan 16, 2015)

Now, I am actually trying to prevent pkg from clobbering an installed _port._  But it should work the same way, no?

But...

```
# pkg lock (package)
lock this package? [Y/n] Y
package locked.
# pkg upgrade
[it clobbers my installed port]
```
Am I missing something?

Similarly...

```
# portmaster -P foo
[it starts installing ports for dependencies when there are packages available]
```


----------



## woodsb02 (Jan 17, 2015)

What version of FreeBSD are you running on? To ensure that the FreeBSD Ports Collection registers new software with pkgng, and not the traditional packages format, FreeBSD versions earlier than 10._X_ require this line in /etc/make.conf:


```
WITH_PKGNG= yes
```


Also, what is the output of the following command?
`pkg lock -l`


----------

