Upgrades and repositories
Proxmox VE ships preset with software package repositories 1 access to which is subject to subscription. Unless you have one, this would leave you without upgrades. Rather than following the elaborate manual editing of files 2 after every new install, you can achieve the same with the following:
No-subscription repositories
source /etc/os-release
rm /etc/apt/sources.list.d/*
cat > /etc/apt/sources.list.d/pve.list <<< "deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription"
# only if using CEPH
cat > /etc/apt/sources.list.d/ceph.list <<< "deb http://download.proxmox.com/debian/ceph-squid $VERSION_CODENAME no-subscription"
This follows the Debian way 3 of setting custom APT data sources, i.e. not changing the /etc/apt/sources.list
file itself. 4 It removes pre-existing (non-Debian) lists first, then determines current system’s VERSION_CODENAME
from /etc/os-release
information, 5 which are then used to correctly populate the separate pve.list
and ceph.list
files.
Caution
Ceph needs its name manually correctly set in the path still, such as ceph-squid
in this case.
Update and upgrade
The Proxmox way is simply:
apt update && apt -y full-upgrade
The update
merely synchronises the package index by fetching it from the specified remote sources. It is the upgrade
that installs actual packages.
Notes
upgrade or full-upgrade (dist-upgrade)
The difference between regular upgrade
(as commonly used with plain Debian installs) and full-upgrade
lies in the additional possibility of some packages getting REMOVED during full-upgrade
which Proxmox, unlike Debian, may need during their regular release cycle. Failing to use full-upgrade
instead of upgrade
could result in partially upgraded system, or in case of present bugs, 6 inoperable system, remedy of which lies in the eventual use of full-upgrade
.
The options of full-upgrade
and dist-upgrade
are equivalent, the latter becoming obsolete. You would have found dist-upgrade
in older official Proxmox docs which still also mention apt-get
. 7
apt or apt-get
Interestingly, the apt
8 and apt-get
9 are a bit different still, with the latter being a lower level utility.
Default apt
behaviour follows that of apt-get
with --with-new-pkgs
switch: 10
Allow installing new packages when used in conjunction with upgrade. This is useful if the update of an installed package requires new dependencies to be installed. Instead of holding the package back upgrade will upgrade the package and install the new dependencies. Note that upgrade with this option will never remove packages, only allow adding new ones. Configuration Item: APT::Get::Upgrade-Allow-New.
Furthermore, apt
(unlike apt-get
) will NOT keep .deb
package files in /var/cache/apt/archives
after installation, this corresponds to APT::Keep-Downloaded-Packages
NOT set. 11
pveupdate and pveupgrade
These are just Proxmox wrappers that essentially tuck in update
12 and dist-upgrade
13 with further elaborate actions tossed in, such as subscription information updates or ACME certificate renewals.
https://pve.proxmox.com/wiki/Package_Repositories#_repositories_in_proxmox_ve ↩︎
https://pve.proxmox.com/wiki/Package_Repositories#sysadmin_no_subscription_repo ↩︎
https://manpages.debian.org/bookworm/apt/sources.list.5.en.html ↩︎
https://manpages.debian.org/bookworm/systemd/os-release.5.en.html ↩︎
https://lists.proxmox.com/pipermail/pve-devel/2024-September/065276.html ↩︎
https://pve.proxmox.com/pve-docs/pve-admin-guide.html#system_software_updates ↩︎
https://manpages.debian.org/bookworm/apt/apt-get.8.en.html ↩︎
https://github.com/Debian/apt/blob/560ef5de0197a0ec1ac293cf91a983748a6b379b/apt-private/private-cmndline.cc#L506 ↩︎
https://github.com/Debian/apt/commit/ee02b5b3949372a178d37cadaa08db0bfd5b991f ↩︎
https://github.com/proxmox/pve-manager/blob/883af414a9bbd772baee510e027f1ae1767f9e53/bin/pveupdate#L67 ↩︎
https://github.com/proxmox/pve-manager/blob/883af414a9bbd772baee510e027f1ae1767f9e53/bin/pveupgrade#L45 ↩︎