Since pkg-1.5.4, pkg upgrade wants to remove locked packages, in my case ffmpeg-2.3.6_3.1, installed from ports. This was not the case in pkg-1.5.3. Output is given below. #pkg -v 1.5.4 #pkg upgrade scythe@x3200 ~ % sudo pkg upgrade Password: Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. Checking for upgrades (52 candidates): 100% Processing candidates (52 candidates): 9% ffmpeg-2.3.6_3,1 is locked and may not be modified ffmpeg-2.3.6_3,1 is locked and may not be modified ffmpeg-2.3.6_3,1 is locked and may not be modified ffmpeg-2.3.6_3,1 is locked and may not be modified ffmpeg-2.3.6_3,1 is locked and may not be modified ffmpeg-2.3.6_3,1 is locked and may not be modified ffmpeg-2.3.6_3,1 is locked and may not be modified Processing candidates (52 candidates): 100% The following 16 package(s) will be affected (of 0 checked): Installed packages to be REMOVED: ffmpeg-2.3.6_3,1 musicpd-0.18.23 transcode-1.1.7_22 Installed packages to be UPGRADED: youtube_dl: 2015.03.03.1 -> 2015.06.04.1 sqlite3: 3.8.10.1 -> 3.8.10.2 py27-setuptools27: 5.5.1_1 -> 17.0 mplayer: 1.1.r20150403_1 -> 1.1.r20150403_2 mc-light: 4.1.40.p9_10 -> 4.1.40.p9_11 lsof: 4.89.d,8 -> 4.89.e,8 libvpx: 1.3.0_1 -> 1.4.0 curl: 7.42.1 -> 7.42.1_1 cups-image: 1.7.3_3 -> 2.0.3_2 cups-client: 1.7.3_4 -> 2.0.3_2 Installed packages to be REINSTALLED: openssl-1.0.2_3 (options changed) ghostscript9-9.06_10 (needed shared library changed) bind-tools-9.10.2 (options changed) The operation will free 45 MiB. 26 MiB to be downloaded. Proceed with this action? [y/N]: #pkg lock -l Currently locked packages: ffmpeg-2.3.6_3,1 mkvtoolnix-7.7.0 strongswan-5.3.2
I think the culprit was libvpx. It was meant to be upgraded and as it is a dependency of ffmpeg, it tried to update ffmpeg, too. However ffmpeg was locked and it decided to remove it, and then upgrade libvpx. Thus I am unsure whether this is actually a bug.