[SOLVED] No priority (or zero) specified for pin - apt update / apt upgrade is not working anymore

leandrosgf

New Member
Mar 11, 2025
6
0
1
Sao Paulo / Brazil
Hello All!

I need help with my Proxmox VE. This morning, I started getting the message "No priority (or zero) specified for pin" when I tried to update/upgrade my system.

My apt-cache policy shows this:
apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages
release o=Proxmox,a=stable,n=bookworm,l=Proxmox Debian Repository,c=pve-no-subscription,b=amd64
origin download.proxmox.com
500 http://repository.netdata.cloud/repos/repoconfig/debian bookworm/ Packages
release v=12,o=Netdata,n=bookworm,l=Netdata,c=
origin repository.netdata.cloud
500 http://repository.netdata.cloud/repos/stable/debian bookworm/ Packages
release v=12,o=Netdata,n=bookworm,l=Netdata,c=
origin repository.netdata.cloud
500 http://repo.netdata.cloud/repos/repoconfig/debian bookworm/ Packages
release v=12,o=Netdata,n=bookworm,l=Netdata,c=
origin repo.netdata.cloud
500 http://repo.netdata.cloud/repos/stable/debian bookworm/ Packages
release v=12,o=Netdata,n=bookworm,l=Netdata,c=
origin repo.netdata.cloud
500 http://security.debian.org/debian-security bookworm-security/contrib amd64 Packages
release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=contrib,b=amd64
origin security.debian.org
500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=main,b=amd64
origin security.debian.org
500 http://deb.debian.org/debian bookworm-updates/contrib amd64 Packages
release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=contrib,b=amd64
origin deb.debian.org
500 http://deb.debian.org/debian bookworm-updates/main amd64 Packages
release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=main,b=amd64
origin deb.debian.org
500 http://deb.debian.org/debian bookworm/contrib amd64 Packages
release v=12.9,o=Debian,a=stable,n=bookworm,l=Debian,c=contrib,b=amd64
origin deb.debian.org
500 http://deb.debian.org/debian bookworm/main amd64 Packages
release v=12.9,o=Debian,a=stable,n=bookworm,l=Debian,c=main,b=amd64
origin deb.debian.org
Pinned packages:
E: No priority (or zero) specified for pin

Currently running 6.8.12-8-pve ( I was using it before without any problems )

Thanks in advance!
 
This smells like you have been using apt upgrade or apt-get upgrade instead of apt-get dist-upgrade , as you should have been doing, see my post today on this subject. This can cause packages/dependencies to break.

What does the following output ls /etc/apt/preferences.d/
 
This smells like you have been using apt upgrade or apt-get upgrade instead of apt-get dist-upgrade , as you should have been doing, see my post today on this subject. This can cause packages/dependencies to break.

What does the following output ls /etc/apt/preferences.d/
Make sense.. I started to use apt update && apt upgrade -y recently.

Output:
ls /etc/apt/preferences.d/
80netdata

80netdata content:
Package: *
Pin: origin "repository.netdata.cloud"
Priority: 1000


I've tried to use "apt-get update" and it's working fine.
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://repo.netdata.cloud/repos/stable/debian bookworm/ InRelease
Hit:4 http://repository.netdata.cloud/repos/stable/debian bookworm/ InRelease
Hit:5 http://security.debian.org/debian-security bookworm-security InRelease
Hit:6 http://repo.netdata.cloud/repos/repoconfig/debian bookworm/ InRelease
Hit:7 http://repository.netdata.cloud/repos/repoconfig/debian bookworm/ InRelease
Hit:8 http://download.proxmox.com/debian/pve bookworm InRelease
Reading package lists... Done

But when I try apt-get dist-upgrade:
Reading package lists... Done
E: No priority (or zero) specified for pin
 
Last edited:
Show output for that 80netdata file with: cat /etc/apt/preferences.d/80netdata

You are probably going to find it has a line with Priority: in it which needs to be changed to Pin-Priority: , as shown here in the apt_preferences manpage.

I've dealt with a few of these on other system today - This is actually Netdata's fault with an erroneous update some days ago.
 
OK, I started my post before you replied assuming what I would see! I was correct.

Still NEVER USE APT UPGRADE!
 
Last edited:
  • Like
Reactions: leandrosgf
OK, I started my post before you replied assuming what I would see! I was correct.

Still NEVER USE APT UPGRADE!
Yep... Checking my backup, the Netdata fault also make sense.
My backup from March 8 days ago doesn't show any files on the/etc/apt/preferences.d directory.

Changing the line Priority to Pin-Priority has fixed the problem.
Thanks a lot!

"apt-get update" and "apt-get dist-upgrade" should be my way of updating from now on!
 
Last edited:
Show output for that 80netdata file with: cat /etc/apt/preferences.d/80netdata

You are probably going to find it has a line with Priority: in it which needs to be changed to Pin-Priority: , as shown here in the apt_preferences manpage.

I've dealt with a few of these on other system today - This is actually Netdata's fault with an erroneous update some days ago.
THANK YOU, I have always used `apt dist-upgrade`, but still ran into this error message. Netdata was the culprit for me as well, appreciate the info and fix!
 
  • Like
Reactions: leandrosgf