{"id":1201,"date":"2023-07-15T09:52:12","date_gmt":"2023-07-15T07:52:12","guid":{"rendered":"http:\/\/daisy-street.fr\/?p=1201"},"modified":"2023-07-15T09:52:15","modified_gmt":"2023-07-15T07:52:15","slug":"low-space","status":"publish","type":"post","link":"https:\/\/daisy-street.fr\/index.php\/2023\/07\/15\/low-space\/","title":{"rendered":"low space"},"content":{"rendered":"\n<p>On my server (with docker) i have sometime the space of the root directory to 0%<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>df -h<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>Filesystem                    Size  Used Avail Use% Mounted on\ntmpfs                          86M   11M   75M  13% \/run\n\/dev\/sda2                      20G   20G     0 100% \/\ntmpfs                         476M     0  476M   0% \/dev\/shm\ntmpfs                         5,0M     0  5,0M   0% \/run\/lock\n192.212.40.6:\/6-40-SystemSvg  227G   32G  184G  15% \/SystemSvg\n192.212.40.6:\/9-VideoClub     1,8T  774G  967G  45% \/VideoClub\ntmpfs                         146M  8,0K  146M   1% \/run\/user\/1000<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">docker clean non essential stuff<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>docker system prune -a\ndocker volume rm $(docker volume ls -qf dangling=true)\ndocker system prune --all --volumes --force<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">empty trash<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>rm -rf ~\/.local\/share\/Trash\/*<\/code><\/pre><\/div>\n\n\n\n<p>or<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo apt install trash-cli<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>trash-empty<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">system clean sweep<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo apt-get autoremove\nsudo apt-get clean\nsudo apt-get autoclean\n<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">find big stuff in file system<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo du -h --max-depth=1 | sort -h<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>0       .\/dev\n0       .\/proc\n0       .\/sys\n4,0K    .\/cdrom\n4,0K    .\/media\n4,0K    .\/mnt\n4,0K    .\/srv\n4,0K    .\/VideoClub\n16K     .\/lost+found\n16K     .\/opt\n52K     .\/root\n60K     .\/home\n68K     .\/tmp\n1,3M    .\/run\n6,7M    .\/etc\n428M    .\/boot\n823M    .\/SystemSvg\n1,7G    .\/snap\n4,7G    .\/var\n9,9G    .\/usr\n20G     .\n<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">limit log in container<\/h2>\n\n\n\n<p><a href=\"https:\/\/forums.docker.com\/t\/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay\/30604\/53\">https:\/\/forums.docker.com\/t\/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay\/30604\/53<\/a><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;service_name&gt;\n\tlogging:\n\t\toptions:\n\t\t\tmax-size: &quot;10m&quot;\n\t\t\tmax-file: &quot;5&quot;<\/code><\/pre><\/div>\n\n\n\n<p><a href=\"https:\/\/forums.docker.com\/t\/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay\/30604\/52\">https:\/\/forums.docker.com\/t\/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay\/30604\/52<\/a><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\/etc\/docker\/daemon.json\n\n{\n  &quot;log-opts&quot;: {\n    &quot;max-size&quot;: &quot;10m&quot;,\n    &quot;max-file&quot;: &quot;5&quot;\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p>dont forget the &#8220;,&#8221; if they have allready param in daemon.json<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On my server (with docker) i have sometime the space of the root directory to 0% docker clean non essential stuff empty trash or system clean sweep find big stuff in file system limit log in container https:\/\/forums.docker.com\/t\/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay\/30604\/53 https:\/\/forums.docker.com\/t\/some-way-to-clean-up-identify-contents-of-var-lib-docker-overlay\/30604\/52 dont forget the &#8220;,&#8221; if they have allready param in daemon.json<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[12,228],"tags":[229,15],"class_list":["post-1201","post","type-post","status-publish","format-standard","hentry","category-software","category-ubuntu","tag-diskspace","tag-ubuntu"],"jetpack_publicize_connections":[],"featured_image_src":null,"author_info":{"display_name":"admin9483","author_link":"https:\/\/daisy-street.fr\/index.php\/author\/admin9483\/"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/1201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/comments?post=1201"}],"version-history":[{"count":1,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/1201\/revisions"}],"predecessor-version":[{"id":1202,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/1201\/revisions\/1202"}],"wp:attachment":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/media?parent=1201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/categories?post=1201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/tags?post=1201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}