{"id":2031,"date":"2023-11-27T22:46:15","date_gmt":"2023-11-27T17:16:15","guid":{"rendered":"https:\/\/www.veeble.org\/kb\/?p=2031"},"modified":"2025-04-15T12:49:35","modified_gmt":"2025-04-15T07:19:35","slug":"linux-disk-usage-guide","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/linux-disk-usage-guide\/","title":{"rendered":"Find High Disk Usage in Linux: A Simple Guide"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-high-disk-usage-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"489\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-high-disk-usage-scaled.jpg\" alt=\"high disk usage linux\" class=\"wp-image-6804\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-high-disk-usage-scaled.jpg 2560w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-high-disk-usage-300x57.jpg 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-high-disk-usage-1024x196.jpg 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-high-disk-usage-768x147.jpg 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-high-disk-usage-1536x294.jpg 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-high-disk-usage-2048x391.jpg 2048w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/a><\/figure>\n\n\n\n<p>Is your Linux system running slowly, or are you getting alarming notifications about high disk usage? This guide will provide you with simple commands to help you identify what&#8217;s taking up all the space.<\/p>\n\n\n<h4 class=\"wp-block-heading\" id=\"checking-overall-disk-usage\">Checking Overall Disk Usage<\/h4>\n\n\n<p>To start our journey, let&#8217;s get a bird&#8217;s-eye view of your disk space:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">df -h\n<\/pre>\n\n\n\n<p>This command provides a human-readable summary of disk usage across <a href=\"https:\/\/tldp.org\/LDP\/Linux-Filesystem-Hierarchy\/html\/index.html\" target=\"_blank\" rel=\"noopener\">various partitions<\/a>. Look for the &#8220;Use%&#8221; column to spot any partitions nearing full capacity.<\/p>\n\n\n\n<p><em><sub>Refer to the below blog for a detailed explanation of<\/sub><\/em><sub><em> the<\/em> <\/sub><em><sub>DU command and its usage:<\/sub><\/em><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-knowledge-base-veeble-hosting wp-block-embed-knowledge-base-veeble-hosting\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.veeble.org\/kb\/disk-usage-du-command\n<\/div><\/figure>\n\n\n\n<div class=\"wp-block-uagb-separator uagb-block-7257ec45\"><div class=\"wp-block-uagb-separator__inner\" style=\"--my-background-image:\"><\/div><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"locating-large-directories\">Locating Large Directories<\/h4>\n\n\n<p>Now that you know your overall disk status, let&#8217;s zoom in on specific directories guzzling space:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">du -h --max-depth=1 \/<\/pre>\n\n\n\n<p>This command lists the sizes of top-level directories. Navigate to the largest ones using <code>cd<\/code> and repeat the process until you identify the space hogs.<\/p>\n\n\n\n<div class=\"wp-block-uagb-separator uagb-block-f23a4bde\"><div class=\"wp-block-uagb-separator__inner\" style=\"--my-background-image:\"><\/div><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"digging-deeper-with-find\">Digging Deeper with Find<\/h4>\n\n\n<p>Once you&#8217;ve isolated a suspicious directory, use the <code><a href=\"https:\/\/man7.org\/linux\/man-pages\/man1\/find.1.html\" target=\"_blank\" rel=\"noopener\">find<\/a><\/code> command to locate large files within it:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">find \/path\/to\/directory -type f -size +100M<\/pre>\n\n\n\n<p>Replace <code>\/path\/to\/directory<\/code> with the actual path and adjust the size threshold as needed. This command finds files larger than 100 megabytes.<\/p>\n\n\n\n<div class=\"wp-block-uagb-separator uagb-block-e0a3922d\"><div class=\"wp-block-uagb-separator__inner\" style=\"--my-background-image:\"><\/div><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"sorting-and-summarizing\">Sorting and Summarizing<\/h4>\n\n\n<p>To sort directories by size, aiding in the identification of the biggest culprits:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">du -h --max-depth=1 \/ | sort -hr\n<\/pre>\n\n\n\n<p>This command lists directories in descending order, helping you focus on the largest ones first.<\/p>\n\n\n\n<div class=\"wp-block-uagb-separator uagb-block-b25f55ea\"><div class=\"wp-block-uagb-separator__inner\" style=\"--my-background-image:\"><\/div><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"cleanup-commands\">Clean-Up Commands<\/h4>\n\n\n<p>Once you&#8217;ve identified space-consuming files or directories, consider these commands for efficient cleanup:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Removing a file: <code>rm \/path\/to\/file<\/code><\/li>\n\n\n\n<li>Removing a directory and its contents: <code>rm -r \/path\/to\/directory<\/code><\/li>\n<\/ul>\n\n\n\n<p>Be cautious when using these commands to avoid unintentional data loss.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>With these simple commands, you can easily navigate and manage high disk usage on your Linux system. Regularly monitoring and optimizing your storage will keep your system running smoothly.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-c6de397a wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Supercharge WordPress: Managed Hosting That Works.<\/h3><p class=\"uagb-cta__desc\">Stop server headaches. Blazing speed, security, &amp; expert support. Automatic updates, backups &amp; staging. Focus on your content.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/managed-wordpress\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Get Started.<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Is your Linux system running slowly, or are you getting alarming notifications about high disk usage? This guide will provide you with simple commands [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":8597,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2031","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-High-Disk-Usage-in-Linux-A-Simple-Guide.jpg",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-High-Disk-Usage-in-Linux-A-Simple-Guide-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-High-Disk-Usage-in-Linux-A-Simple-Guide-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-High-Disk-Usage-in-Linux-A-Simple-Guide-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-High-Disk-Usage-in-Linux-A-Simple-Guide-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-High-Disk-Usage-in-Linux-A-Simple-Guide.jpg",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/11\/Find-High-Disk-Usage-in-Linux-A-Simple-Guide.jpg",1366,768,false]},"uagb_author_info":{"display_name":"Adrian Antony","author_link":"https:\/\/www.veeble.com\/kb\/author\/adrian\/"},"uagb_comment_info":0,"uagb_excerpt":"Is your Linux system running slowly, or are you getting alarming notifications about high disk usage? This guide will provide you with simple commands [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=2031"}],"version-history":[{"count":11,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2031\/revisions"}],"predecessor-version":[{"id":8092,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2031\/revisions\/8092"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/8597"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=2031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=2031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=2031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}