Proxmox VEXVIII · Maintenance & LifecycleRepositories and kernels
Repositories, apt pinning and kernel pinning
What you'll learn
- Choose a repository per environment and state the trade-off you accepted
- Write PVE 9 deb822 .sources files correctly for Trixie
- Hold, pin and downgrade a package, and find the holds nobody remembers
- Pin a known-good kernel after a regression and set an expiry on the pin
- Decide an unattended-upgrade policy appropriate to a hypervisor
Prerequisites
Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-12
Two questions decide what runs on a Proxmox node: which repository it draws from, and what you have pinned so that it does not move. Both are usually configured once during installation and never revisited, and both have consequences that surface months later.
The kernel half of this has become concrete: PVE 9.2 moved the default kernel from the 6.x series to 7.0. A fleet that upgrades into that transition and finds one hardware class unhappy needs a way to stay on the kernel that worked, without also standing still on everything else.
The three repositories
They carry the same code at different points in its life.
| Repository | Component | Timing | Requires |
|---|---|---|---|
| Enterprise | pve-enterprise | Latest, after the widest testing | A subscription |
| No-subscription | pve-no-subscription | Earlier, less soak | Nothing |
| Test | pve-test | First. Not for production | Nothing |
The documentation is direct about which is recommended: the enterprise repository “contains the most stable packages and is suitable for production use.”
The distinction people get wrong is thinking no-subscription is a lesser edition. It is not — it is the same packages, published sooner, with less time between release and your node. That is a genuine trade rather than a quality difference, and it points different ways in different environments: for production you want the soak; during a critical advisory you may want the fix.
Writing the sources files for PVE 9
PVE 9 runs on Debian 13 Trixie and uses the deb822 .sources format.
Four files, and all four suites must say trixie.
# /etc/apt/sources.list.d/pve-enterprise.sources
Types: deb
URIs: https://enterprise.proxmox.com/debian/pve
Suites: trixie
Components: pve-enterprise
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
# /etc/apt/sources.list.d/proxmox.sources (no-subscription alternative)
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
# /etc/apt/sources.list.d/debian.sources
Types: deb deb-src
URIs: http://deb.debian.org/debian/
Suites: trixie trixie-updates
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Types: deb deb-src
URIs: http://security.debian.org/debian-security/
Suites: trixie-security
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Two details are load-bearing.
trixie-security is where base-OS security fixes come from, and it
is not subject to the enterprise-versus-no-subscription timing question
at all. When a CVE is in openssl or the kernel rather than in a pve-*
package, this is the file that matters.
non-free-firmware is required for CPU microcode. intel-microcode
and amd64-microcode live there. A node whose debian.sources lists
only main cannot install microcode updates, which is a silent gap
covered in the firmware lesson.
ls -1 /etc/apt/sources.list.d/
grep -rE '^(Types|URIs|Suites|Components):' /etc/apt/sources.list.d/
apt-cache policy
apt-cache policy pve-managerapt modernize-sources converts legacy sources.list entries to the
deb822 format and is the right cleanup after an 8-to-9 upgrade.
Holding a package that must not move
apt-mark hold prevents a package from being upgraded or removed.
apt-mark hold pve-qemu-kvm
apt-mark showhold
apt-mark unhold pve-qemu-kvmHolds are the right tool for a narrow, temporary situation: a package whose newer version is known to break something in your environment, or a component you need to keep still while an in-flight upgrade completes.
For finer control than “never upgrade this”, apt_preferences pins by
version, origin or release. Its most common legitimate use on a Proxmox
node is preferring a specific package from one repository while taking
everything else from another:
# /etc/apt/preferences.d/pve-no-subscription-pin
Package: *
Pin: release n=trixie, c=pve-no-subscription
Pin-Priority: 100
A priority below 500 means “available, but not preferred”, so packages
come from that repository only when explicitly requested with
apt install package=version. That is a defensible way to keep a faster
repository configured for emergencies without drawing everything from it.
Pinning is easy to get subtly wrong and hard to notice — apt-cache policy is the verification, and it should be run after every change to
preferences.d.
Downgrading
apt-cache policy pve-qemu-kvm
apt list -a pve-qemu-kvm
apt install pve-qemu-kvm=9.2.0-1
apt-mark hold pve-qemu-kvmThe hold immediately afterwards is not optional. Without it the next
apt upgrade puts the package straight back, and the incident recurs at
the worst possible moment — during a routine patch window, when nobody is
watching for it.
/var/cache/apt/archives is frequently the only copy of the version you
are rolling back to, because Proxmox repositories carry a limited set of
older versions. That is the argument against apt clean as a reflex
during a change window; apt autoclean, which removes only packages no
longer downloadable, is the safer habit.
Kernel pinning
The kernel is not an ordinary package. It is selected by the bootloader,
Proxmox keeps several installed at once, and the tool that decides which
one boots is proxmox-boot-tool rather than apt.
apt-mark hold on a kernel metapackage stops new kernels installing.
proxmox-boot-tool kernel pin decides which installed kernel boots.
The second is almost always the one you want, because it keeps new
kernels arriving and reviewable while the node continues to run the one
you trust.
proxmox-boot-tool kernel list
uname -r
proxmox-boot-tool statusproxmox-boot-tool kernel pin 6.17.2-4-pve
proxmox-boot-tool kernel listproxmox-boot-tool kernel pin 7.0.2-6-pve --next-boot
rebootUse --next-boot to test a kernel and a plain pin to stay on one.
A one-shot boot used as a rollback reverts silently at the next reboot,
weeks later, during something unrelated — which is the worst time to
rediscover the regression.
proxmox-boot-tool kernel unpin
proxmox-boot-tool kernel listUnattended upgrades on a hypervisor
Debian’s unattended-upgrades can apply security updates automatically.
On a general-purpose server that is straightforwardly good. On a
hypervisor it needs a policy, because the blast radius of an automatic
change is every guest on the node.
A defensible middle position for most estates:
Enable automatic download, disable automatic install. Packages are staged locally so a patch window is fast and does not depend on the network, and nothing changes without a human.
If you do enable automatic install, restrict it to the security
origins and exclude the packages whose upgrade restarts something that
matters — pve-manager, qemu-server, pve-qemu-kvm, pve-cluster and
the kernel metapackages.
Never enable automatic reboot. Unattended-Upgrade::Automatic-Reboot
on a hypervisor takes every guest down at whatever hour the timer fires,
with no HA drain, no ordering and no notice.
# /etc/apt/apt.conf.d/52unattended-upgrades-proxmox
Unattended-Upgrade::Package-Blacklist {
"pve-manager";
"pve-qemu-kvm";
"qemu-server";
"pve-container";
"pve-cluster";
"proxmox-kernel-.*";
"proxmox-default-kernel";
};
Unattended-Upgrade::Automatic-Reboot "false";
unattended-upgrade --dry-run --debugThe honest position is that a hypervisor wants scheduled patching with a human, HA drain and a soak — the rolling procedure from the patching lesson — rather than automatic patching. Unattended upgrades on a Proxmox node are best used to make that window fast, not to replace it.
Common mistakes
- Mixed repositories across one cluster. Version skew nobody chose, surfacing at migration time.
- A suite still saying
bookwormon a PVE 9 node. That is PVE 8 packages on Debian 13. debian.sourceswithoutnon-free-firmware. CPU microcode cannot be installed, silently.- A hold with no review date. The package stops receiving security
updates while
aptreports success. - Downgrading without a hold. The next
apt upgradeundoes it, during a routine window. apt cleanduring a change window. The cache is often the only copy of the version you would roll back to.apt-mark holdon a kernel instead ofproxmox-boot-tool kernel pin. Stops new kernels arriving rather than controlling which one boots.--next-bootused as a permanent rollback. It reverts at the following reboot.Unattended-Upgrade::Automatic-Reboot "true"on a hypervisor. Every guest, at whatever hour the timer fires, with no drain.
Key takeaways
- Enterprise, no-subscription and test are the same code at different ages. Enterprise is recommended for production; pick one per cluster.
- PVE 9 means
trixiein every suite, andnon-free-firmwareindebian.sourcesfor microcode. trixie-securitycarries base-OS fixes and is unaffected by the repository timing question.- A hold silently stops security updates.
apt-mark showholdis the only way to find one. - Downgrade, then hold, or the next upgrade undoes it. Prefer
apt autocleantoapt clean. - Pin what boots with
proxmox-boot-tool kernel pin; hold what installs withapt-mark hold. The first is usually the right tool. --next-boottests a kernel; a plain pin keeps one.- Every pin and hold needs a ticket with a date, and a fleet-wide check.
- Unattended upgrades on a hypervisor: download automatically, install deliberately, never reboot automatically.
Knowledge check
Knowledge check · 4 questions
Q1. A node needs to keep booting kernel 6.17.2-4-pve after a regression in 7.0, while continuing to receive kernel security updates for evaluation. Which is the correct mechanism?
Q2. A node has been reporting successful apt upgrades for eight months, yet a security scan finds it running a vulnerable version of one package. What should you check?
Q3. Which unattended-upgrades settings are appropriate on a Proxmox hypervisor? Select all that apply.
Q4. Downgrading a package with apt install package=version is sufficient to keep that older version in place.
Passing score: 75%. Answers are checked in this browser.