{"id":63,"date":"2012-07-23T10:58:41","date_gmt":"2012-07-23T09:58:41","guid":{"rendered":"http:\/\/toolbox.pingvinfeszek.hu\/?p=63"},"modified":"2016-03-02T10:54:24","modified_gmt":"2016-03-02T09:54:24","slug":"remove-unused-kernel-header-files-in-ubuntu","status":"publish","type":"post","link":"https:\/\/wp.gaborhargitai.hu\/remove-unused-kernel-header-files-in-ubuntu\/","title":{"rendered":"Remove unused kernel header files in Ubuntu"},"content":{"rendered":"

Straightforward, constant updating is the key to have a fresh and bleeding edge Ubuntu system. However, for those of you who are strapped for disk space – for instance if you are hosting multiple operating systems on one drive – “useless” files can eat up quite a big chunck of your available megabytes. Numerous ways exist to erase and purge unnecessary files and packages, but for the most part they all omit one crucial step: removing those kernel headers that have remained on your drive since downloading and using them for the first time<\/strong>.<\/p>\n

In order to remove ALL<\/strong> but the one you are currently<\/strong> using (check it by entering “uname -r<\/strong>” in the Terminal), hit up a Terminal and issue the following command in one line:<\/p>\n

 
\nsudo apt-get purge $(dpkg --get-selections | awk '((\/^linux-\/) && (\/[0-9]\\.\/) && (!\/'\"`uname -r | sed \"s\/-generic\/\/g\"`\"'\/)) {print $1}')<\/code>
\n <\/p>\n

The APT daemon will ask you whether you’d like to remove the headers and stuff – be sure to double check your current kernel’s version. That’s all folks \ud83d\ude42<\/p>\n

 <\/p>\n

Source is available by clicking here<\/a>, as this is a repost\/reblog of the real thing.<\/p>\n","protected":false},"excerpt":{"rendered":"

Straightforward, constant updating is the key to have a fresh and bleeding edge Ubuntu system. However, for those of you who are strapped for disk space – for instance if you are hosting multiple operating systems on one drive – “useless” files can eat up quite a big chunck of your available megabytes. Numerous ways […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,1,7],"tags":[],"_links":{"self":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/63"}],"collection":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":4,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":189,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/63\/revisions\/189"}],"wp:attachment":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}