{"id":2757,"date":"2013-02-04T11:21:35","date_gmt":"2013-02-04T10:21:35","guid":{"rendered":"https:\/\/thebc.ch\/blog\/?p=2757"},"modified":"2013-02-04T11:21:35","modified_gmt":"2013-02-04T10:21:35","slug":"debian-linux-remove-orphaned-packages","status":"publish","type":"post","link":"https:\/\/thebc.ch\/blog\/?p=2757","title":{"rendered":"Debian Linux: remove orphaned packages"},"content":{"rendered":"<p>deborphan command finds packages that have no packages depending on them. The default operation is to search only within the libs and oldlibs sections to hunt down unused libraries.<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\">$ deborphan -sz<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Where,<\/p>\n<ul>\n<li>-s: Show the sections the packages are in.<\/li>\n<li>-z: Show the installed size of the packages found.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>You can remove orphaned package with apt-get remove command:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\"># apt-get remove packagename<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>&nbsp;<\/p>\n<p>Alternatively, remove all orphaned package in one command:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\"># apt-get remove $(deborphan)<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>&nbsp;<\/p>\n<p>Better try:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\"># apt-get remove --purge $(deborphan)<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n","protected":false},"excerpt":{"rendered":"<p>deborphan command finds packages that have no packages depending on them. The default operation is to search only within the libs and oldlibs sections to hunt down unused libraries. 1$ deborphan -sz Where, -s: Show the sections the packages are &hellip; <a href=\"https:\/\/thebc.ch\/blog\/?p=2757\">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":{"footnotes":""},"categories":[11,5],"tags":[235,446,236,237],"class_list":["post-2757","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","tag-apt-get","tag-debian","tag-deborphan","tag-orphans"],"_links":{"self":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2757"}],"version-history":[{"count":5,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2757\/revisions"}],"predecessor-version":[{"id":2762,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2757\/revisions\/2762"}],"wp:attachment":[{"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thebc.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}