{"id":2738,"date":"2013-08-01T14:04:39","date_gmt":"2013-08-01T13:04:39","guid":{"rendered":"http:\/\/blog.ed.gs\/?p=2738"},"modified":"2013-08-01T14:04:39","modified_gmt":"2013-08-01T13:04:39","slug":"purge-old-apt-packages-using-dpkg","status":"publish","type":"post","link":"https:\/\/ed.gs\/2013\/08\/01\/purge-old-apt-packages-using-dpkg\/","title":{"rendered":"Purge Old apt Packages Using dpkg"},"content":{"rendered":"
When you apt-get remove packages it can still leave behind old configs and other crap you’d probably want to get rid of, here’s how you do it.<\/p>\n
Firstly you can have a look at what’s been removed but not completely by running the following:<\/p>\n
dpkg -l | grep "^rc"<\/pre>\nYou can then extract the names from the list using:<\/p>\n
dpkg -l | grep "^rc" | cut -d " " -f 3<\/pre>\nIf we want to purge them all then we just run:<\/p>\n
dpkg -l | grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge<\/pre>\n","protected":false},"excerpt":{"rendered":"When you apt-get remove packages it can still leave behind old configs and other crap you’d probably want to get rid of, here’s how you do it. Firstly you can have a look at what’s been removed but not completely by running the following: dpkg -l | grep "^rc" You can then extract the names […]<\/p>\n","protected":false},"author":2,"featured_media":3479,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false},"categories":[32,41],"tags":[],"yoast_head":"\n
Purge Old apt Packages Using dpkg - E<\/title>\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\t\n