{"id":219,"date":"2015-06-07T13:12:55","date_gmt":"2015-06-07T11:12:55","guid":{"rendered":"http:\/\/www.emperial.dk\/?p=219"},"modified":"2015-06-07T15:46:50","modified_gmt":"2015-06-07T13:46:50","slug":"list-package-after-size-in-debianubuntu","status":"publish","type":"post","link":"https:\/\/www.emperial.dk\/?p=219","title":{"rendered":"list package after size in Debian\/Ubuntu"},"content":{"rendered":"<p>I had a Ubuntu system where the root drive almost was full i suspected it was some packages that apt-get autoremove couldn&#8217;t remove, that was using the drive.<\/p>\n<p>This small script will list the installed packages on your system ending with the biggest.<\/p>\n<pre class=\"bbcode_code\">dpkg-query -W --showformat='${Installed-Size;10}\\t${Package}\\n' | sort -k1,1n<\/pre>\n<p class=\"bbcode_code\">On my system this was a huge amount of old kernel images, and kernel sources that was installed.<\/p>\n<p class=\"bbcode_code\">to remove the packages i used:<\/p>\n<pre class=\"bbcode_code\">apt-get remove --purge<\/pre>\n<p>to see the total amount of storage used and exclude the \/mnt (all my discs are mounted here) use:<\/p>\n<pre>du -shc --exclude \/mnt \/*<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I had a Ubuntu system where the root drive almost was full i suspected it was some packages that apt-get autoremove couldn&#8217;t remove, that was using the drive. This small script will list the installed packages on your system ending &hellip; <a href=\"https:\/\/www.emperial.dk\/?p=219\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,24,4,25],"tags":[46,12,16,9],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-debian","category-debian-linux","category-linux","category-ubuntu-linux","tag-debian","tag-linux-2","tag-servers","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":4,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions\/222"}],"wp:attachment":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}