{"id":2102,"date":"2015-06-25T11:50:08","date_gmt":"2015-06-25T11:50:08","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=2102"},"modified":"2024-11-29T11:33:37","modified_gmt":"2024-11-29T11:33:37","slug":"update-packages","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/command-line\/package-managers\/update-packages","title":{"rendered":"Update Packages"},"content":{"rendered":"\n<p>As well as wanting to regularly check for updates so any security vulnerabilities are patched, you should also check for updates before installing anything new as often applications rely on the system being up to date to be able to install correctly.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Updating all installed packages<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update\nsudo apt-get upgrade<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update; sudo apt-get upgrade<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Update Operating System Distribution<\/h4>\n\n\n\n<p>apt-get update will not perform an update of the operating system to the most recent distribution.  If you need new features or support for new hardware then you may need to carry out a distribution upgrade:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update\r\nsudo apt-get dist-upgrade\r\nsudo rpi-update\r\nsudo reboot<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Automatic Updates, Upgrade, Remove\u00a0unused, Remove old<\/h4>\n\n\n\n<p>This updates the packages, upgrades the packages, removes unused packages, then removes old versions of packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update -y &amp;&amp; sudo apt-get upgrade -y &amp;&amp; sudo apt-get autoremove -y &amp;&amp; sudo apt-get autoclean -y<\/code><\/pre>\n\n\n\n<p><em>This kind of works, but we&#8217;ve found certain update messages will still open and halt the update process until you press a key, such as &#8220;press q to quit&#8221;, or &#8220;choose an option N=default&#8221;.  We are still looking for a simple reliable way that can be used so that Raspbian can be triggered to self update without any user interaction and a keyboard being required<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As well as wanting to regularly check for updates so any security vulnerabilities are patched, you should also check for updates before installing anything new as often applications rely on the system being up to date to be able to install correctly. Updating all installed packages or Update Operating System Distribution apt-get update will not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[197],"tags":[],"class_list":["post-2102","post","type-post","status-publish","format-standard","hentry","category-package-managers"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=2102"}],"version-history":[{"count":10,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2102\/revisions"}],"predecessor-version":[{"id":3434,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2102\/revisions\/3434"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=2102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=2102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=2102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}