{"id":195,"date":"2026-05-31T23:23:58","date_gmt":"2026-06-01T06:23:58","guid":{"rendered":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/"},"modified":"2026-05-31T23:23:58","modified_gmt":"2026-06-01T06:23:58","slug":"how-to-set-up-automatic-updates-ubuntu-unattended-upgrades","status":"publish","type":"post","link":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/","title":{"rendered":"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>Ubuntu&#8217;s <code class=\"\" data-line=\"\">unattended-upgrades<\/code> package handles automatic security updates without requiring you to SSH in and run <code class=\"\" data-line=\"\">apt upgrade<\/code> manually. If you&#8217;re running a VPS or dedicated server and you&#8217;re not using this, your server is likely sitting unpatched between visits \u2014 and that&#8217;s how most opportunistic compromises happen.<\/p>\n<p>This isn&#8217;t about enabling full unattended upgrades for every package blindly. It&#8217;s about understanding what the tool does, configuring it sensibly for a production environment, and making sure it notifies you when something needs attention. There&#8217;s a meaningful difference between &#8220;security patches only&#8221; and &#8220;upgrade everything automatically&#8221; \u2014 and that distinction matters a lot on a live server.<\/p>\n<p>This guide applies to Ubuntu 20.04 LTS, 22.04 LTS, and 24.04 LTS. The package and config structure is the same across all three. If you&#8217;re on an older release, I&#8217;d strongly recommend upgrading \u2014 Ubuntu 18.04 reached end-of-life in April 2023.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Root or sudo access to your Ubuntu server<\/li>\n<li>Ubuntu 20.04, 22.04, or 24.04 (this guide is tested on all three)<\/li>\n<li>A working internet connection from the server (to reach Ubuntu&#8217;s package mirrors)<\/li>\n<li>Basic comfort with the Linux command line \u2014 you&#8217;ll be editing a config file and running <code class=\"\" data-line=\"\">apt<\/code> commands<\/li>\n<li>If you want email notifications, a working mail transfer agent (MTA) such as <code class=\"\" data-line=\"\">postfix<\/code> or an external SMTP relay configured on the server<\/li>\n<\/ul>\n<h2>Step 1: Install unattended-upgrades<\/h2>\n<p>On most Ubuntu installations, <code class=\"\" data-line=\"\">unattended-upgrades<\/code> is already installed. Check first before installing:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-1\"><code class=\"\" data-line=\"\">dpkg -l unattended-upgrades<\/code><\/pre>\n<\/div>\n<p>If the output shows <code class=\"\" data-line=\"\">ii<\/code> at the start of the line, it&#8217;s installed. If not, install it along with <code class=\"\" data-line=\"\">apt-listchanges<\/code> (which summarises what changed in each update):<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-2\"><code class=\"\" data-line=\"\">sudo apt update\nsudo apt install unattended-upgrades apt-listchanges -y<\/code><\/pre>\n<\/div>\n<h2>Step 2: Enable automatic updates via dpkg-reconfigure<\/h2>\n<p>The quickest way to enable the service is through the interactive configuration wizard:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-3\"><code class=\"\" data-line=\"\">sudo dpkg-reconfigure -plow unattended-upgrades<\/code><\/pre>\n<\/div>\n<p>This prompts you with a yes\/no dialog. Select <strong>Yes<\/strong>. It writes the enable file at <code class=\"\" data-line=\"\">\/etc\/apt\/apt.conf.d\/20auto-upgrades<\/code> with sensible defaults.<\/p>\n<p>To verify what was written:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-4\"><code class=\"\" data-line=\"\">cat \/etc\/apt\/apt.conf.d\/20auto-upgrades<\/code><\/pre>\n<\/div>\n<p>You should see:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-5\"><code class=\"\" data-line=\"\">APT::Periodic::Update-Package-Lists &quot;1&quot;;\nAPT::Periodic::Unattended-Upgrade &quot;1&quot;;<\/code><\/pre>\n<\/div>\n<p>The <code class=\"\" data-line=\"\">&quot;1&quot;<\/code> means these tasks run every 1 day. You can set <code class=\"\" data-line=\"\">&quot;7&quot;<\/code> for weekly, but I&#8217;d leave it at daily for security patches.<\/p>\n<h2>Step 3: Configure which updates are applied automatically<\/h2>\n<p>The main configuration file is <code class=\"\" data-line=\"\">\/etc\/apt\/apt.conf.d\/50unattended-upgrades<\/code>. Open it in your preferred editor:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-6\"><code class=\"\" data-line=\"\">sudo nano \/etc\/apt\/apt.conf.d\/50unattended-upgrades<\/code><\/pre>\n<\/div>\n<p>The most important section is the <code class=\"\" data-line=\"\">Allowed-Origins<\/code> block near the top. By default it looks like this (on Ubuntu 22.04):<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-7\"><code class=\"\" data-line=\"\">Unattended-Upgrade::Allowed-Origins {\n    &quot;${distro_id}:${distro_codename}&quot;;\n    &quot;${distro_id}:${distro_codename}-security&quot;;\n    \/\/ &quot;${distro_id}:${distro_codename}-updates&quot;;\n    \/\/ &quot;${distro_id}:${distro_codename}-proposed&quot;;\n    \/\/ &quot;${distro_id}:${distro_codename}-backports&quot;;\n};<\/code><\/pre>\n<\/div>\n<p>The lines starting with <code class=\"\" data-line=\"\">\/\/<\/code> are commented out. For most production servers, leaving only <code class=\"\" data-line=\"\">-security<\/code> enabled is the right call. Security patches are vetted more carefully and are less likely to cause breakage than general <code class=\"\" data-line=\"\">-updates<\/code> packages.<\/p>\n<p>If you also want bug-fix updates (not just security), uncomment the <code class=\"\" data-line=\"\">-updates<\/code> line by removing the <code class=\"\" data-line=\"\">\/\/<\/code>. I&#8217;d avoid enabling <code class=\"\" data-line=\"\">-proposed<\/code> or <code class=\"\" data-line=\"\">-backports<\/code> on any server you care about.<\/p>\n<h3>Enable email notifications<\/h3>\n<p>Find and edit the <code class=\"\" data-line=\"\">Mail<\/code> line in the same file:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-8\"><code class=\"\" data-line=\"\">Unattended-Upgrade::Mail &quot;you@yourdomain.com&quot;;\nUnattended-Upgrade::MailReport &quot;on-change&quot;;<\/code><\/pre>\n<\/div>\n<p><code class=\"\" data-line=\"\">on-change<\/code> sends email only when updates were actually applied. Other options are <code class=\"\" data-line=\"\">always<\/code> and <code class=\"\" data-line=\"\">only-on-error<\/code>. On a busy server, <code class=\"\" data-line=\"\">always<\/code> gets noisy fast.<\/p>\n<h3>Enable automatic reboots (optional \u2014 read the warning first)<\/h3>\n<p>Some kernel updates require a reboot to take effect. You can automate this:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-9\"><code class=\"\" data-line=\"\">Unattended-Upgrade::Automatic-Reboot &quot;true&quot;;\nUnattended-Upgrade::Automatic-Reboot-WithUsers &quot;false&quot;;\nUnattended-Upgrade::Automatic-Reboot-Time &quot;03:00&quot;;<\/code><\/pre>\n<\/div>\n<p><strong>\u26a0 Warning:<\/strong> Enabling automatic reboots on a production server can cause unexpected downtime if a reboot takes longer than expected or if a service doesn&#8217;t restart cleanly. On a managed Host &amp; Tech <a href=\"https:\/\/www.hostandtech.com\/vps-ssd-servers\">VPS SSD Hosting<\/a> plan, your server is monitored and will restart services automatically \u2014 but you should still know a reboot is scheduled. If you enable this, set the time to a low-traffic window and make sure your critical services have proper systemd restart policies.<\/p>\n<h2>Step 4: Test the configuration without applying updates<\/h2>\n<p>Before relying on the automation, do a dry run. This simulates what would happen without actually installing anything:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-10\"><code class=\"\" data-line=\"\">sudo unattended-upgrade --dry-run --debug<\/code><\/pre>\n<\/div>\n<p>You&#8217;ll see verbose output showing which packages would be upgraded and whether the configuration is valid. If it throws errors here, fix them before leaving the daemon running unattended.<\/p>\n<h2>Step 5: Run an immediate upgrade to verify it works<\/h2>\n<p>If the dry run looked clean, run it for real once to confirm end-to-end functionality:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-11\"><code class=\"\" data-line=\"\">sudo unattended-upgrade -v<\/code><\/pre>\n<\/div>\n<p>The <code class=\"\" data-line=\"\">-v<\/code> flag gives verbose output. You&#8217;ll see packages being fetched and installed (or a message that nothing needed updating). Check the log afterward:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-12\"><code class=\"\" data-line=\"\">cat \/var\/log\/unattended-upgrades\/unattended-upgrades.log<\/code><\/pre>\n<\/div>\n<h2>Step 6: Verify the systemd timer is active<\/h2>\n<p>On Ubuntu 20.04 and later, unattended-upgrades runs via <code class=\"\" data-line=\"\">apt-daily.timer<\/code> and <code class=\"\" data-line=\"\">apt-daily-upgrade.timer<\/code> \u2014 not a traditional cron job. Check their status:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-13\"><code class=\"\" data-line=\"\">systemctl status apt-daily.timer\nsystemctl status apt-daily-upgrade.timer<\/code><\/pre>\n<\/div>\n<p>Both should show <code class=\"\" data-line=\"\">active (waiting)<\/code>. If either is inactive, enable it:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-14\"><code class=\"\" data-line=\"\">sudo systemctl enable --now apt-daily.timer\nsudo systemctl enable --now apt-daily-upgrade.timer<\/code><\/pre>\n<\/div>\n<p>\ud83d\udcdd <strong>Note:<\/strong> <code class=\"\" data-line=\"\">apt-daily.timer<\/code> handles updating the package lists. <code class=\"\" data-line=\"\">apt-daily-upgrade.timer<\/code> is what actually installs the updates. Both need to be active. A common gotcha is that only one of them is running and users wonder why updates aren&#8217;t being applied.<\/p>\n<h2>Common Issues &amp; Troubleshooting<\/h2>\n<h3>Updates aren&#8217;t being applied even though unattended-upgrades is enabled<\/h3>\n<p>First, check the log at <code class=\"\" data-line=\"\">\/var\/log\/unattended-upgrades\/unattended-upgrades.log<\/code> for errors. Then verify both systemd timers are active (see Step 6). A frequently missed issue: if <code class=\"\" data-line=\"\">\/var\/run\/reboot-required<\/code> exists from a previous kernel update, some configurations pause further upgrades until the reboot is completed. Check with <code class=\"\" data-line=\"\">cat \/var\/run\/reboot-required<\/code> and reboot if needed.<\/p>\n<h3>&#8220;E: Could not get lock \/var\/lib\/dpkg\/lock-frontend&#8221; errors in the log<\/h3>\n<p>This means another <code class=\"\" data-line=\"\">apt<\/code> process was running at the same time \u2014 usually a manually triggered <code class=\"\" data-line=\"\">apt upgrade<\/code> or another script. unattended-upgrades will retry, but if this happens frequently, check for overlapping cron jobs or admin processes competing with the timer. Don&#8217;t delete the lock file manually unless you&#8217;ve confirmed no apt process is actually running.<\/p>\n<h3>Email notifications aren&#8217;t arriving<\/h3>\n<p>This almost always means the MTA isn&#8217;t configured, not a problem with unattended-upgrades itself. Test it directly:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-15\"><code class=\"\" data-line=\"\">echo &quot;Test&quot; | mail -s &quot;Test from server&quot; you@yourdomain.com<\/code><\/pre>\n<\/div>\n<p>If that doesn&#8217;t arrive, fix your mail setup first. A common solution on VPS environments is to configure a relay through an external SMTP provider (Mailgun, Postmark, etc.) since many cloud providers block outbound port 25.<\/p>\n<h3>A bad update broke something \u2014 how do I roll back?<\/h3>\n<p>unattended-upgrades doesn&#8217;t have a built-in rollback. You can downgrade a specific package using:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-16\"><code class=\"\" data-line=\"\">sudo apt install packagename=version<\/code><\/pre>\n<\/div>\n<p>To find the previous version: <code class=\"\" data-line=\"\">apt-cache showpkg packagename<\/code>. For kernel rollbacks, you can select an older kernel from the GRUB boot menu on next reboot. This is one reason I&#8217;d recommend keeping automatic reboots disabled on production servers and reviewing kernel updates manually.<\/p>\n<h3>unattended-upgrades is running but the log shows &#8220;No packages found that can be upgraded unattended&#8221;<\/h3>\n<p>This usually means your <code class=\"\" data-line=\"\">Allowed-Origins<\/code> entries don&#8217;t match the actual repository labels. Run <code class=\"\" data-line=\"\">apt-cache policy<\/code> and compare the origin strings against what&#8217;s in your config. The variable substitution (<code class=\"\" data-line=\"\">${distro_id}<\/code>, <code class=\"\" data-line=\"\">${distro_codename}<\/code>) should handle this automatically, but on custom or minimal installs the <code class=\"\" data-line=\"\">lsb-release<\/code> package might be missing, causing the variables to resolve to empty strings. Fix: <code class=\"\" data-line=\"\">sudo apt install lsb-release<\/code>.<\/p>\n<h2>FAQ<\/h2>\n<div class=\"ht-faq-section\">\n<h2>Frequently Asked Questions<\/h2>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Will unattended-upgrades automatically upgrade my Ubuntu version (e.g. 22.04 to 24.04)?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>No. unattended-upgrades only handles package-level updates within your current Ubuntu release. Major version upgrades (like 22.04 to 24.04) require running `do-release-upgrade` manually. These are intentionally kept separate because major upgrades carry much more risk and should always be done with a backup and a maintenance window.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Is it safe to enable automatic updates on a production server?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>For security-only updates, yes \u2014 in my experience the risk of not patching outweighs the risk of a security patch causing breakage. For general updates or kernel updates with auto-reboot, it depends on your tolerance for unplanned downtime. I&#8217;d recommend enabling security updates automatically and reviewing everything else manually.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How do I check which packages were automatically updated?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Check the log at \/var\/log\/unattended-upgrades\/unattended-upgrades.log. It records every package installed, the date, and any errors. For a quick summary of recent changes across all apt activity (not just unattended-upgrades), you can also check \/var\/log\/dpkg.log.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Can I exclude specific packages from being automatically updated?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Yes. In \/etc\/apt\/apt.conf.d\/50unattended-upgrades, find the Package-Blacklist section and add package names there. For example, to prevent MySQL from being auto-updated: add &#8220;mysql-server&#8221;; inside the block. This is useful for packages where you want to control the upgrade timing yourself.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Does unattended-upgrades work on Ubuntu minimal or server installs?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Yes, but you may need to install it manually \u2014 it&#8217;s not always included in minimal cloud images. Run sudo apt install unattended-upgrades to get it. Also double-check that lsb-release is installed, since the config file uses distro name variables that depend on it.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Leaving Ubuntu security patches to run manually is a risk most servers eventually pay for. This guide walks you through setting up unattended-upgrades so your system stays patched automatically \u2014 with enough control that you won&#8217;t get surprised by a bad update.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[49],"tags":[474,473,21,244,15,475,472,448],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-linux","tag-apt","tag-automatic-updates","tag-linux-security","tag-server-maintenance","tag-ubuntu","tag-ubuntu-automatic-updates-unattended-upgrades","tag-unattended-upgrades","tag-vps-management"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)<\/title>\n<meta name=\"description\" content=\"Learn how to configure automatic Ubuntu updates using unattended-upgrades. Keep your VPS or server patched without manual intervention \u2014 step-by-step guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)\" \/>\n<meta property=\"og:description\" content=\"Learn how to configure automatic Ubuntu updates using unattended-upgrades. Keep your VPS or server patched without manual intervention \u2014 step-by-step guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/\" \/>\n<meta property=\"og:site_name\" content=\"Host And Tech knowledge base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stshostandtech\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-01T06:23:58+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:site\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\"},\"headline\":\"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)\",\"datePublished\":\"2026-06-01T06:23:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/\"},\"wordCount\":1365,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"keywords\":[\"apt\",\"automatic updates\",\"Linux security\",\"server maintenance\",\"Ubuntu\",\"Ubuntu automatic updates unattended upgrades\",\"unattended-upgrades\",\"VPS management\"],\"articleSection\":[\"Linux Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/\",\"name\":\"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\"},\"datePublished\":\"2026-06-01T06:23:58+00:00\",\"description\":\"Learn how to configure automatic Ubuntu updates using unattended-upgrades. Keep your VPS or server patched without manual intervention \u2014 step-by-step guide.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"name\":\"Host And Tech knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\",\"name\":\"Host And Tech knowledge base\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"contentUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"width\":1134,\"height\":395,\"caption\":\"Host And Tech knowledge base\"},\"image\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/stshostandtech\",\"https:\\\/\\\/x.com\\\/stshostandtech\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/hostandtech.com\\\/kb\"],\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/author\\\/admin_fjj7qydm\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)","description":"Learn how to configure automatic Ubuntu updates using unattended-upgrades. Keep your VPS or server patched without manual intervention \u2014 step-by-step guide.","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:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)","og_description":"Learn how to configure automatic Ubuntu updates using unattended-upgrades. Keep your VPS or server patched without manual intervention \u2014 step-by-step guide.","og_url":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/","og_site_name":"Host And Tech knowledge base","article_publisher":"https:\/\/www.facebook.com\/stshostandtech","article_published_time":"2026-06-01T06:23:58+00:00","author":"admin","twitter_card":"summary_large_image","twitter_creator":"@stshostandtech","twitter_site":"@stshostandtech","twitter_misc":{"Written by":"admin","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/#article","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/"},"author":{"name":"admin","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee"},"headline":"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)","datePublished":"2026-06-01T06:23:58+00:00","mainEntityOfPage":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/"},"wordCount":1365,"commentCount":0,"publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"keywords":["apt","automatic updates","Linux security","server maintenance","Ubuntu","Ubuntu automatic updates unattended upgrades","unattended-upgrades","VPS management"],"articleSection":["Linux Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/","url":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/","name":"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/#website"},"datePublished":"2026-06-01T06:23:58+00:00","description":"Learn how to configure automatic Ubuntu updates using unattended-upgrades. Keep your VPS or server patched without manual intervention \u2014 step-by-step guide.","breadcrumb":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hostandtech.com\/kb\/linux\/how-to-set-up-automatic-updates-ubuntu-unattended-upgrades\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostandtech.com\/kb\/"},{"@type":"ListItem","position":2,"name":"How to Set Up Automatic Updates on Ubuntu (unattended-upgrades)"}]},{"@type":"WebSite","@id":"https:\/\/hostandtech.com\/kb\/#website","url":"https:\/\/hostandtech.com\/kb\/","name":"Host And Tech knowledge base","description":"","publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostandtech.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostandtech.com\/kb\/#organization","name":"Host And Tech knowledge base","url":"https:\/\/hostandtech.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","contentUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","width":1134,"height":395,"caption":"Host And Tech knowledge base"},"image":{"@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stshostandtech","https:\/\/x.com\/stshostandtech"]},{"@type":"Person","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/hostandtech.com\/kb"],"url":"https:\/\/hostandtech.com\/kb\/author\/admin_fjj7qydm\/"}]}},"_links":{"self":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":0,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"wp:attachment":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}