{"id":1065,"date":"2026-09-06T22:07:47","date_gmt":"2026-09-06T22:07:47","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=1065"},"modified":"2026-09-28T22:02:32","modified_gmt":"2026-09-28T22:02:32","slug":"unattended-upgrades-failure-modes-vps-deferred-reboots","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/","title":{"rendered":"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Automatic patching is normally described as install-and-forget. The reality on a long-lived VPS is a set of specific failure modes: a held package that blocks every subsequent security update, a kernel that is installed but never booted, an <code>apt-daily<\/code> timer that collides with your own maintenance window, and a <code>--dry-run<\/code> that reports success while doing nothing. Each is verifiable from the command line in under a minute.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Confirm what is actually being applied<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>Origins-Pattern<\/code> list in <code>\/etc\/apt\/apt.conf.d\/50unattended-upgrades<\/code> decides everything. If <code>${distro_id}:${distro_codename}-security<\/code> is present but <code>-updates<\/code> is not, you are patching CVEs and skipping bugfixes that sometimes carry security-relevant backports. More importantly, the release codename in that file is written from the file in <code>\/etc\/os-release<\/code> at install time; after an in-place release upgrade the pattern can silently reference a codename that no longer has any sources.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-config dump APT::Periodic::Unattended-Upgrade\nls -l \/var\/lib\/apt\/periodic\/\njournalctl -u unattended-upgrades --since '14 days ago' | grep -Ei 'no .*package|not upgrading|held'\n\/usr\/lib\/apt\/apt.systemd.daily --dry-run 2>&1 | tail -40<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>--dry-run<\/code> integration test writes a lock file into <code>\/var\/lib\/apt\/periodic\/<\/code> and can leave a stale one behind if interrupted. A stale <code>unattended-upgrades-stamp<\/code> combined with a stale <code>download-upgradeable-stamp<\/code> is the most common reason a working configuration stops running: the timer starts, sees a lock, and exits 0 without logging anything alarming. Delete stale stamps only after confirming no apt process holds the dpkg lock.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Held packages block the whole transaction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">apt resolves upgrades transactionally. One package forced to <code>hold<\/code> &#8211; typically a hand-patched nginx or a pinned PHP &#8211; causes all packages depending on it to be skipped, which often includes the security update you actually care about. Enumerate the blocking set before it bites:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-mark showhold\nAPT_LISTCHANGES_FRONTEND=none apt-get -s dist-upgrade \\\n  | grep -E 'kept back|not upgraded|held'\n# read the dependency chain for one held package\napt-get -s install --only-upgrade nginx 2>&1 | head -20<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Symptom in journal<\/th><th>Root cause<\/th><th>Verification<\/th><\/tr><\/thead><tbody><tr><td>No log entries for days<\/td><td>stale stamp or missing timer<\/td><td><code>systemctl list-timers apt-daily*<\/code><\/td><\/tr><tr><td>&#8216;kept back&#8217; lines repeat<\/td><td>package hold or phased update<\/td><td><code>apt-mark showhold<\/code>, <code>apt-get -s dist-upgrade<\/code><\/td><\/tr><tr><td>Downloaded but not applied<\/td><td><code>APT::Periodic::Install-OnShutdown<\/code> off<\/td><td><code>apt-config dump | grep Install-OnShutdown<\/code><\/td><\/tr><tr><td>Applies then reverts<\/td><td>image\/config management re-pins version<\/td><td>diff your CM state against dpkg versions<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Phased updates make patching look late<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ubuntu&#8217;s phased-update system withholds a package from a percentage of machines for days to catch regressions. This is by design, but it means <code>unattended-upgrades<\/code> legitimately reports nothing to do while a security fix is available upstream. If you need the fix immediately, override per-package rather than disabling phasing globally:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get -s upgrade | grep -i phased\n# force a specific package past phasing\ncat >\/etc\/apt\/apt.conf.d\/99-phasing-override <<'EOF'\nAPT::Get::Always-Include-Phased-Updates \"true\";\nEOF\napt-get -o APT::Get::Always-Include-Phased-Updates=true install --only-upgrade openssl<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Leaving the global override in place defeats the safety mechanism; scope it to the single invocation, as shown. On a fleet where every node shares a template, phasing is often the only thing preventing a simultaneous fleet-wide regression, so keep it enabled by default. For a broader look at hardening decisions that interact with patching - SSH exposure, auditd rules, and firewall posture - see the security-oriented work summarized alongside our <a href=\"https:\/\/virtualserversvps.com\/\">VPS hosting specifications and isolation model<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Kernels install; they do not boot<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>linux-image-generic<\/code> upgrades land in <code>\/boot<\/code> and sit idle until a reboot. The classic consequence is a host reporting a patched kernel version while <code>uname -r<\/code> still shows the vulnerable one. Detect the divergence explicitly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>uname -r\nls -1 \/boot\/vmlinuz-* | sed 's|\/boot\/vmlinuz-||' | sort -V | tail -3\n[ -f \/var\/run\/reboot-required ] && cat \/var\/run\/reboot-required\n# what reboot reason\napt-get -s autoremove 2>\/dev\/null | grep -i 'linux-image'\ndpkg -l 'linux-image-*' | awk '\/^ii\/{print $2, $3}'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>needrestart<\/code> tool answers the adjacent question - which running services still hold pre-patch libraries in memory. In non-interactive mode it returns a status you can alert on, which is more reliable than parsing <code>reboot-required<\/code> alone:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NEEDRESTART_MODE=l needrestart -b 2>\/dev\/null | grep -E 'SERVICES|KERNEL'\n# exit code 1 = services need restart, 2 = kernel reboot needed<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Map those exit codes to an alert and pair it with an explicit maintenance policy: reboot weekly during a defined window, allow up to one kernel behind on a spare node, and never let the gap exceed the vendor's supported patch interval. Prune old kernels with <code>apt autoremove --purge<\/code> only after confirming the running kernel is not the one being removed - on small instances <code>\/boot<\/code> filling up is itself a patching outage, and a full <code>\/boot<\/code> will fail every subsequent kernel upgrade while security updates to userspace keep succeeding, masking the problem until the next reboot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Making the reboot decision auditable<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\"Reboot weekly\" is a policy, not a mechanism. Make it observable so that a missed window is a signal rather than a surprise. Record the running kernel and the newest installed kernel in a text file each boot, then diff against the previous entry. A growing number of lines means the host is accumulating pending kernels and the maintenance window is not being honoured.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat >\/etc\/cron.daily\/kernel-drift <<'EOF'\n#!\/bin\/sh\nNEW=$(ls -1 \/boot\/vmlinuz-* | sed 's|\/boot\/vmlinuz-||' | sort -V | tail -1)\nRUN=$(uname -r)\nLOG=\/var\/log\/kernel-drift.log\n[ \"$NEW\" != \"$RUN\" ] &#038;&#038; echo \"$(date -Is) pending=$NEW running=$RUN\" >> \"$LOG\"\nsed -i '1,200!d' \"$LOG\"\nEOF\nchmod +x \/etc\/cron.daily\/kernel-drift\n# sanity check for \/boot capacity before the next kernel lands\ndf -h \/boot\napt-get -s --purge autoremove | grep -c '^Remv linux-image'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run the same drill against a rebuilt instance periodically. A patch pipeline that has never been exercised end to end is an assumption, not a control, and instance-level snapshots let you validate it without risking the production host - the capabilities and restore behaviour are described on our <a href=\"https:\/\/virtualserversvps.com\/\">VPS hosting features overview<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automatic patching is normally described as install-and-forget. The reality on a long-lived VPS is a set of specific failure modes: a held package that blocks every subsequent security update, a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1065","post","type-post","status-publish","format-standard","hentry","category-security-compliance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies - Virtual Servers VPS Blog<\/title>\n<meta name=\"description\" content=\"Automatic patching is normally described as install-and-forget. The reality on a long-lived VPS is a set of specific failure modes: a held package that\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies\" \/>\n<meta property=\"og:description\" content=\"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-06T22:07:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-28T22:02:32+00:00\" \/>\n<meta name=\"author\" content=\"Virtual-Servers-Vps-Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virtual-Servers-Vps-Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/\",\"name\":\"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-09-06T22:07:47+00:00\",\"dateModified\":\"2026-09-28T22:02:32+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"description\":\"Automatic patching is normally described as install-and-forget. The reality on a long-lived VPS is a set of specific failure modes: a held package that\",\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/\",\"name\":\"Virtual Servers VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\",\"name\":\"Virtual-Servers-Vps-Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"caption\":\"Virtual-Servers-Vps-Editor\"},\"sameAs\":[\"https:\/\/virtualserversvps.com\/blog\"],\"url\":\"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies - Virtual Servers VPS Blog","description":"Automatic patching is normally described as install-and-forget. The reality on a long-lived VPS is a set of specific failure modes: a held package that","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/","og_locale":"en_US","og_type":"article","og_title":"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies","og_description":"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies","og_url":"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-09-06T22:07:47+00:00","article_modified_time":"2026-09-28T22:02:32+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/","url":"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/","name":"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-09-06T22:07:47+00:00","dateModified":"2026-09-28T22:02:32+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"description":"Automatic patching is normally described as install-and-forget. The reality on a long-lived VPS is a set of specific failure modes: a held package that","breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/unattended-upgrades-failure-modes-vps-deferred-reboots\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Unattended-Upgrades Failure Modes on a VPS: Holding Kernels, Deferred Reboots, and the Dry-Run That Lies"}]},{"@type":"WebSite","@id":"https:\/\/virtualserversvps.com\/blog\/#website","url":"https:\/\/virtualserversvps.com\/blog\/","name":"Virtual Servers VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0","name":"Virtual-Servers-Vps-Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","caption":"Virtual-Servers-Vps-Editor"},"sameAs":["https:\/\/virtualserversvps.com\/blog"],"url":"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/"}]}},"_links":{"self":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/comments?post=1065"}],"version-history":[{"count":2,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1065\/revisions"}],"predecessor-version":[{"id":1243,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1065\/revisions\/1243"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=1065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=1065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=1065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}