{"id":6216,"date":"2022-05-23T22:40:56","date_gmt":"2022-05-23T21:40:56","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=6216"},"modified":"2023-02-13T09:21:18","modified_gmt":"2023-02-13T08:21:18","slug":"ubuntu-linux-cleanup-disk-space","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/ubuntu-linux-cleanup-disk-space\/","title":{"rendered":"Ubuntu \/ Linux cleanup disk space"},"content":{"rendered":"\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"sh\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\"># run with sudo \n\n# remove apt cache\napt-get clean\n# full-remove unused packages (old kernels etc.)\napt-get autoremove --purge\n# remove journal log older than 2 days\njournalctl --vacuum-time=2d\n# remove thumbnail cache or other files from the user-cache folder\nrm -rf ~\/.cache\/thumbnails\/\n\n\n# find all log files (not directories see -type f) in \/var\/log older than 30 days\nsudo find \/var\/log\/ -type f -mtime +30\n# verify the list an then delete all log files in \/var\/log older than 30 days\nsudo find \/var\/log\/ -type f -mtime +30 -delete\n\n# delete empty directories\nsudo find \/var\/log\/ -type d -mindepth 1 -empty -delete\n\n<\/pre><\/div>\n\n\n\n<p><a href=\"https:\/\/github.com\/oguzhaninan\/Stacer\">https:\/\/github.com\/oguzhaninan\/Stacer<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/github.com\/oguzhaninan\/Stacer<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6216","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/6216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=6216"}],"version-history":[{"count":4,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/6216\/revisions"}],"predecessor-version":[{"id":7366,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/6216\/revisions\/7366"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=6216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=6216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=6216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}