{"id":329,"date":"2026-07-15T15:17:10","date_gmt":"2026-07-15T13:17:10","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=329"},"modified":"2026-10-24T00:59:51","modified_gmt":"2026-10-23T22:59:51","slug":"tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/","title":{"rendered":"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian"},"content":{"rendered":"<p>A nearly full filesystem needs a diagnosis before cleanup. Large individual files are one possible cause; many small files, open deleted files or filesystem-specific storage can also matter. The following commands inspect usage on Ubuntu and Debian. The commands do not delete files.<\/p>\n<h2>First identify the filesystem<\/h2>\n<p>After connecting through SSH, an absolute path defines the area to inspect. The example path below must be replaced with an existing directory. <code>df<\/code> reports the filesystem containing that directory, not just the directory itself.<\/p>\n<figure style=\"--cbb-digits:1\" class=\"cbb cbb--wrap wp-block-code-beautifier-block-code\" data-lang=\"bash\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Shell<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-bash\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-function\">df<\/span> <span class=\"cbb-attr\">-h<\/span> -- <span class=\"cbb-string\">\"\/path\/to\/directory\"<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-function\">df<\/span> <span class=\"cbb-attr\">-i<\/span> -- <span class=\"cbb-string\">\"\/path\/to\/directory\"<\/span><\/span><\/code><\/pre><\/figure>\n<p><code>df -h<\/code> reports space in readable binary units. <code>df -i<\/code> reports inode usage where supported. Inodes hold filesystem metadata; exhausting the available inode supply can prevent new files even when data blocks remain free.<\/p>\n<h2>Find individual files larger than 500 MiB<\/h2>\n<figure style=\"--cbb-digits:1\" class=\"cbb cbb--wrap wp-block-code-beautifier-block-code\" data-lang=\"bash\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Shell<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-bash\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-function\">find<\/span> <span class=\"cbb-string\">\"\/path\/to\/directory\"<\/span> <span class=\"cbb-attr\">-xdev<\/span> <span class=\"cbb-attr\">-type<\/span> f <span class=\"cbb-attr\">-size<\/span> +500M <span class=\"cbb-attr\">-exec<\/span> <span class=\"cbb-function\">ls<\/span> <span class=\"cbb-attr\">-lh<\/span> -- {} +<\/span><\/code><\/pre><\/figure>\n<p><code>-type f<\/code> selects regular files. GNU find interprets <code>M<\/code> as 1,048,576 bytes, so <code>+500M<\/code> means larger than 500 MiB, not 500 decimal MB. The comparison uses logical file size. A sparse file can have a large logical size while using few disk blocks.<\/p>\n<p><code>-xdev<\/code> avoids descending into other filesystems. <code>-exec ls -lh -- {} +<\/code> passes matching names directly to <code>ls<\/code> in batches. This lists details but does not rank the results. Quoted paths handle spaces; permission errors still need attention because inaccessible directories make the search incomplete.<\/p>\n<h2>Rank allocated usage with du<\/h2>\n<figure style=\"--cbb-digits:1\" class=\"cbb cbb--wrap wp-block-code-beautifier-block-code\" data-lang=\"bash\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Shell<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-bash\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-function\">du<\/span> <span class=\"cbb-attr\">-axh<\/span> -- <span class=\"cbb-string\">\"\/path\/to\/directory\"<\/span> <span class=\"cbb-operator\">|<\/span> <span class=\"cbb-function\">sort<\/span> <span class=\"cbb-attr\">-rh<\/span> <span class=\"cbb-operator\">|<\/span> <span class=\"cbb-function\">head<\/span> <span class=\"cbb-attr\">-n<\/span> <span class=\"cbb-number\">10<\/span><\/span><\/code><\/pre><\/figure>\n<p><code>du -a<\/code> includes files and directories; <code>-h<\/code> formats sizes and <code>-x<\/code> stays on one filesystem. <code>sort -rh<\/code> orders readable sizes from largest to smallest, and <code>head -n 10<\/code> keeps ten lines. Directory entries include their contents: adding every displayed line would count the same data more than once. This is a top-ten entry list, not a file-only list.<\/p>\n<p>The pipeline is intended for interactive inspection. File names containing newlines can disrupt its line-based presentation. Automated processing needs NUL-delimited records instead. Large scans and sorting can consume time, I\/O and temporary space, so narrowing the starting directory is useful.<\/p>\n<figure class=\"lw-diagram\"><img decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-329-review-20261024.png\" width=\"1120\" height=\"580\" loading=\"lazy\" alt=\"Filesystem usage, logical file size and allocated blocks answer different questions. Additional checks investigate missing entries and inode pressure.\"><figcaption>Filesystem usage, logical file size and allocated blocks answer different questions. Additional checks investigate missing entries and inode pressure.<\/figcaption><\/figure>\n<h2>When the figures do not match<\/h2>\n<p><code>df<\/code> and <code>du<\/code> measure different things. A mismatch is a clue, not proof of one cause. Inaccessible paths, different mount boundaries, snapshots, reserved space and filesystem accounting can also affect the comparison.<\/p>\n<figure style=\"--cbb-digits:1\" class=\"cbb cbb--wrap wp-block-code-beautifier-block-code\" data-lang=\"bash\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Shell<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-bash\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-function\">du<\/span> <span class=\"cbb-attr\">--inodes<\/span> <span class=\"cbb-attr\">-x<\/span> <span class=\"cbb-attr\">--max-depth<\/span>=<span class=\"cbb-number\">1<\/span> -- <span class=\"cbb-string\">\"\/path\/to\/directory\"<\/span> <span class=\"cbb-operator\">|<\/span> <span class=\"cbb-function\">sort<\/span> <span class=\"cbb-attr\">-nr<\/span>\n<\/span><span class=\"cbb-line\">lsof <span class=\"cbb-attr\">-nP<\/span> +L1<\/span><\/code><\/pre><\/figure>\n<p><code>du --inodes<\/code> helps locate directories containing many filesystem entries, including large collections of tiny files. <code>lsof +L1<\/code> lists open files with fewer than one hard link. On Linux, an unlinked file can retain allocated blocks until the final open reference is released. Process visibility depends on permissions, and lsof may need separate installation.<\/p>\n<div class=\"lw-faq\"><h2>Questions and answers<\/h2><h3>Does du overlook lots of small files?<\/h3><p>No. The directory totals include the files, and <code>du --inodes<\/code> offers a complementary count. A threshold search for large individual files can miss this cause, but that limitation does not apply to directory aggregation.<\/p><h3>Is every large file safe to remove?<\/h3><p>No. A database, application file or backup can be large and still required. Cleanup depends on ownership, retention and the application\u2019s supported procedures. For logs, a configured rotation or reopen procedure is preferable to deleting an active file indiscriminately.<\/p><h3>Do these checks explain every full-disk incident?<\/h3><p>No. Quotas, snapshots, filesystem metadata or a different full mount can require additional checks. The exact failing path and filesystem are the starting point.<\/p><\/div>\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/man7.org\/linux\/man-pages\/man1\/du.1.html\" target=\"_blank\" rel=\"noopener noreferrer\">du(1) &#8211; Linux manual page<\/a><\/li>\n<li><a href=\"https:\/\/manpages.debian.org\/trixie\/findutils\/find.1.en.html\" target=\"_blank\" rel=\"noopener noreferrer\">GNU find \u2014 Debian manual<\/a><\/li><li><a href=\"https:\/\/manpages.debian.org\/trixie\/coreutils\/du.1.en.html\" target=\"_blank\" rel=\"noopener noreferrer\">GNU du \u2014 Debian manual<\/a><\/li><li><a href=\"https:\/\/manpages.debian.org\/trixie\/coreutils\/df.1.en.html\" target=\"_blank\" rel=\"noopener noreferrer\">GNU df \u2014 Debian manual<\/a><\/li><li><a href=\"https:\/\/lsof.readthedocs.io\/en\/stable\/manpage\/\" target=\"_blank\" rel=\"noopener noreferrer\">lsof manual<\/a><\/li><\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>A nearly full filesystem needs a diagnosis before cleanup. Large individual files are one possible cause; many small files, open deleted files or filesystem-specific storage can also matter. The following commands inspect usage on Ubuntu and Debian. The commands do not delete files. First identify the filesystem After connecting through SSH, an absolute path defines [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":13737,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[137],"tags":[91064,91294,91237,91099,91219],"class_list":["post-329","post","type-post","status-publish","format-standard","hentry","category-tutorials-en-it-networks","tag-linux","tag-monitoring","tag-self-hosting","tag-server-administration","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian | Lukas Wojcik<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"A nearly full filesystem needs a diagnosis before cleanup. Large individual files are one possible cause; many small files, open deleted files or filesystem-specific storage can also matter. The following commands inspect usage on Ubuntu and Debian. The commands do not delete files. First identify the filesystem After connecting through SSH, an absolute path defines [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-15T13:17:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-23T22:59:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-329-tutorial-managing-disk-space-finding-g.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\\\/Debian\",\"datePublished\":\"2026-07-15T13:17:10+00:00\",\"dateModified\":\"2026-10-23T22:59:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/\"},\"wordCount\":541,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-329-tutorial-managing-disk-space-finding-g.png\",\"keywords\":[\"Linux\",\"Monitoring\",\"Self-Hosting\",\"Server Administration\",\"Tutorial\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/\",\"name\":\"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\\\/Debian | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-329-tutorial-managing-disk-space-finding-g.png\",\"datePublished\":\"2026-07-15T13:17:10+00:00\",\"dateModified\":\"2026-10-23T22:59:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-329-tutorial-managing-disk-space-finding-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-329-tutorial-managing-disk-space-finding-g.png\",\"width\":1200,\"height\":630,\"caption\":\"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\\\/Debian\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/tutorials-en-it-networks\\\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\\\/Debian\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian | Lukas Wojcik","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian | Lukas Wojcik","og_description":"A nearly full filesystem needs a diagnosis before cleanup. Large individual files are one possible cause; many small files, open deleted files or filesystem-specific storage can also matter. The following commands inspect usage on Ubuntu and Debian. The commands do not delete files. First identify the filesystem After connecting through SSH, an absolute path defines [&hellip;]","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-07-15T13:17:10+00:00","article_modified_time":"2026-10-23T22:59:51+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-329-tutorial-managing-disk-space-finding-g.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian","datePublished":"2026-07-15T13:17:10+00:00","dateModified":"2026-10-23T22:59:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/"},"wordCount":541,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-329-tutorial-managing-disk-space-finding-g.png","keywords":["Linux","Monitoring","Self-Hosting","Server Administration","Tutorial"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/","name":"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-329-tutorial-managing-disk-space-finding-g.png","datePublished":"2026-07-15T13:17:10+00:00","dateModified":"2026-10-23T22:59:51+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-329-tutorial-managing-disk-space-finding-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-329-tutorial-managing-disk-space-finding-g.png","width":1200,"height":630,"caption":"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/tutorials-en-it-networks\/tutorial-managing-disk-space-finding-largest-files-via-ssh-on-ubuntu-debian\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Tutorial: Managing Disk Space: Finding Largest Files via SSH on Ubuntu\/Debian"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":4,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/329\/revisions"}],"predecessor-version":[{"id":22901,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/329\/revisions\/22901"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/13737"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}