{"id":1777,"date":"2013-08-21T03:42:19","date_gmt":"2013-08-20T23:42:19","guid":{"rendered":"http:\/\/sandalov.org\/blog\/?p=1777"},"modified":"2013-12-12T15:18:42","modified_gmt":"2013-12-12T11:18:42","slug":"opkg-upgrade-all-packages","status":"publish","type":"post","link":"https:\/\/sandalov.org\/blog\/1777\/","title":{"rendered":"opkg upgrade all packages"},"content":{"rendered":"<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>OpenWrt does not have bash by default. The following commands are in pure busybox.<\/p>\n<ol>\n<li>Get installed packages by calling <em>opkg list_installed<\/em><\/li>\n<li>Remove everything after &#8216; &#8211; &#8216; with sed<\/li>\n<li>Add <em>opkg upgrade<\/em> at the beginning of each line<\/li>\n<li>Finally we evaluate the sed output with <em>eval<\/em><\/li>\n<\/ol>\n<p>Full command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# eval $(opkg list_installed | sed 's\/ - .*\/\/' | sed 's\/^\/opkg upgrade \/')\r\n<\/pre>\n<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>OpenWrt does not have bash by default. The following commands are in pure busybox. Get installed packages by calling opkg list_installed Remove everything after &#8216; &#8211; &#8216; with sed Add opkg upgrade at the beginning of each line Finally we evaluate the sed output with eval Full command: # eval &hellip; <a class=\"continue-reading-link\" href=\"https:\/\/sandalov.org\/blog\/1777\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[341,342,343,344],"class_list":["post-1777","post","type-post","status-publish","format-standard","hentry","category-unsorted","tag-openwrt","tag-update","tag-upgrade","tag-upgrade-all"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/comments?post=1777"}],"version-history":[{"count":9,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1777\/revisions"}],"predecessor-version":[{"id":1786,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1777\/revisions\/1786"}],"wp:attachment":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/media?parent=1777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/categories?post=1777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/tags?post=1777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}