{"id":8941,"date":"2021-10-06T18:07:51","date_gmt":"2021-10-06T18:07:51","guid":{"rendered":"https:\/\/putridparrot.com\/blog\/?p=8941"},"modified":"2021-10-06T18:07:51","modified_gmt":"2021-10-06T18:07:51","slug":"ubuntu-server-auto-upgrade","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/ubuntu-server-auto-upgrade\/","title":{"rendered":"Ubuntu server auto upgrade"},"content":{"rendered":"<p>I have an Ubuntu server happily living it&#8217;s life as a NAS (and more) server which every now and then (if I forget to keep track of updates) it runs out of space on \/boot causing issues removing old releases or partial updates to be a bit of a problem. So how do we either turn on or off automatic upgrades?<\/p>\n<p>The configuration for this is stored in the file <em>20auto-upgrades<\/em>. So we can edit the file using<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/apt\/apt.conf.d\/20auto-upgrades\r\n<\/pre>\n<p>Within the file you&#8217;ll see something like this<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nAPT::Periodic::Update-Package-Lists &quot;1&quot;;\r\nAPT::Periodic::Unattended-Upgrade &quot;1&quot;;\r\n<\/pre>\n<p><em>Note: The &#8220;1&#8221; in the above are not True\/False but the minimum number of days. So we could change from &#8220;1&#8221; to run weekly by changing this value to &#8220;7&#8221;. A value of &#8220;0&#8221; will disable the feature.<\/em><\/p>\n<p>You can create the file yourself or run the following command to create the file (it can be used to turn on\/off by running it on an existing file but that&#8217;s all)<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsudo dpkg-reconfigure -plow unattended-upgrades\r\n<\/pre>\n<p>If you want to change the frequency of checks for updates you&#8217;ll need to edit the <em>20auto-upgrades<\/em> manually (as already discussed).<\/p>\n<p><strong>References<\/strong><\/p>\n<p><a href=\"https:\/\/help.ubuntu.com\/community\/AutomaticSecurityUpdates\" rel=\"noopener\" target=\"_blank\">AutomaticSecurityUpdates<\/a>.<br \/>\n<a href=\"https:\/\/wiki.debian.org\/UnattendedUpgrades#automatic_call_via_.2Fetc.2Fapt.2Fapt.conf.d.2F02periodic\" rel=\"noopener\" target=\"_blank\">UnattendedUpgrades<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have an Ubuntu server happily living it&#8217;s life as a NAS (and more) server which every now and then (if I forget to keep track of updates) it runs out of space on \/boot causing issues removing old releases or partial updates to be a bit of a problem. So how do we either [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[140],"tags":[],"class_list":["post-8941","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/8941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=8941"}],"version-history":[{"count":4,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/8941\/revisions"}],"predecessor-version":[{"id":8946,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/8941\/revisions\/8946"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=8941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=8941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=8941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}