[RndTbl] Best ways to find where disk space is being used?

Adam Thompson athompso at athompso.net
Sun Feb 5 15:05:25 CST 2023


Ncdu(1).  It's in EPEL among other places, and IIRC it's not too hard to compile if you absolutely must.
Its defaults are sane, but check out the options especially "-x".
-Adam

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Roundtable <roundtable-bounces at muug.ca> on behalf of Chris Audet <cj.audet at gmail.com>
Sent: Sunday, February 5, 2023 2:56:04 PM
To: roundtable at muug.ca <roundtable at muug.ca>
Subject: [RndTbl] Best ways to find where disk space is being used?

I've got a fairly long lived CentOS server that stubbornly stopped installing updates because the HDD is full.

Can someone share their favourite way to determine where disk space is being used up on a system?

For example, on Windows I'd use Wiztree/Treesize/Windirstat.  On Linux desktop I've been using Gnome Disk Usage Analyzer (aka Baobab)<https://wiki.gnome.org/Apps/DiskUsageAnalyzer>.

But I'm not sure what the best solutions are in cases where there's no GUI available.  I could always mount / over SSH and use Baobab to crawl the remote filesystem, but that seems less than optimal 🤔

[root at dogmeat ~]# yum update
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: mirror.csclub.uwaterloo.ca<http://mirror.csclub.uwaterloo.ca>
 * epel: ftp.cse.buffalo.edu<http://ftp.cse.buffalo.edu>
 * extras: mirror.xenyth.net<http://mirror.xenyth.net>
 * updates: mirror.csclub.uwaterloo.ca<http://mirror.csclub.uwaterloo.ca>
Excluding 5 updates due to versionlock (use "yum versionlock status" to show them)
Resolving Dependencies
--> Running transaction check
---> Package bind-export-libs.x86_64 32:9.11.4-26.P2.el7_9.10 will be updated
---> Package bind-export-libs.x86_64 32:9.11.4-26.P2.el7_9.13 will be an update
---> Package bind-libs.x86_64 32:9.11.4-26.P2.el7_9.10 will be updated
---> Package bind-libs.x86_64 32:9.11.4-26.P2.el7_9.13 will be an update
---> Package bind-libs-lite.x86_64 32:9.11.4-26.P2.el7_9.10 will be updated
---> Package bind-libs-lite.x86_64 32:9.11.4-26.P2.el7_9.13 will be an update
---> Package bind-license.noarch 32:9.11.4-26.P2.el7_9.10 will be updated
---> Package bind-license.noarch 32:9.11.4-26.P2.el7_9.13 will be an update
---> Package bind-utils.x86_64 32:9.11.4-26.P2.el7_9.10 will be updated
---> Package bind-utils.x86_64 32:9.11.4-26.P2.el7_9.13 will be an update
---> Package dkms.noarch 0:3.0.9-2.el7 will be updated
---> Package dkms.noarch 0:3.0.10-1.el7 will be an update
---> Package httpd.x86_64 0:2.4.6-97.el7.centos.5 will be updated
---> Package httpd.x86_64 0:2.4.6-98.el7.centos.6 will be an update
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 will be updated
---> Package httpd-tools.x86_64 0:2.4.6-98.el7.centos.6 will be an update
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.352.b08-2.el7_9 will be updated
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.362.b08-1.el7_9 will be an update
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.352.b08-2.el7_9 will be updated
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.362.b08-1.el7_9 will be an update
---> Package kernel.x86_64 0:3.10.0-1160.83.1.el7 will be installed
---> Package kernel-devel.x86_64 0:3.10.0-1160.83.1.el7 will be installed
---> Package kernel-headers.x86_64 0:3.10.0-1160.81.1.el7 will be updated
---> Package kernel-headers.x86_64 0:3.10.0-1160.83.1.el7 will be an update
---> Package kernel-tools.x86_64 0:3.10.0-1160.81.1.el7 will be updated
---> Package kernel-tools.x86_64 0:3.10.0-1160.83.1.el7 will be an update
---> Package kernel-tools-libs.x86_64 0:3.10.0-1160.81.1.el7 will be updated
---> Package kernel-tools-libs.x86_64 0:3.10.0-1160.83.1.el7 will be an update
---> Package python-perf.x86_64 0:3.10.0-1160.81.1.el7 will be updated
---> Package python-perf.x86_64 0:3.10.0-1160.83.1.el7 will be an update
---> Package sudo.x86_64 0:1.8.23-10.el7_9.2 will be updated
---> Package sudo.x86_64 0:1.8.23-10.el7_9.3 will be an update
---> Package xorg-x11-server-Xvfb.x86_64 0:1.20.4-19.el7_9 will be updated
---> Package xorg-x11-server-Xvfb.x86_64 0:1.20.4-21.el7_9 will be an update
---> Package xorg-x11-server-common.x86_64 0:1.20.4-19.el7_9 will be updated
---> Package xorg-x11-server-common.x86_64 0:1.20.4-21.el7_9 will be an update
--> Finished Dependency Resolution
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-1160.45.1.el7 will be erased
---> Package kernel-devel.x86_64 0:3.10.0-1160.45.1.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                      Arch    Version                   Repository
                                                                           Size
================================================================================
Installing:
 kernel                       x86_64  3.10.0-1160.83.1.el7      updates    52 M
 kernel-devel                 x86_64  3.10.0-1160.83.1.el7      updates    18 M
Updating:
 bind-export-libs             x86_64  32:9.11.4-26.P2.el7_9.13  updates   1.1 M
 bind-libs                    x86_64  32:9.11.4-26.P2.el7_9.13  updates   158 k
 bind-libs-lite               x86_64  32:9.11.4-26.P2.el7_9.13  updates   1.1 M
 bind-license                 noarch  32:9.11.4-26.P2.el7_9.13  updates    92 k
 bind-utils                   x86_64  32:9.11.4-26.P2.el7_9.13  updates   262 k
 dkms                         noarch  3.0.10-1.el7              epel       85 k
 httpd                        x86_64  2.4.6-98.el7.centos.6     updates   2.7 M
 httpd-tools                  x86_64  2.4.6-98.el7.centos.6     updates    94 k
 java-1.8.0-openjdk           x86_64  1:1.8.0.362.b08-1.el7_9   updates   317 k
 java-1.8.0-openjdk-headless  x86_64  1:1.8.0.362.b08-1.el7_9   updates    33 M
 kernel-headers               x86_64  3.10.0-1160.83.1.el7      updates   9.1 M
 kernel-tools                 x86_64  3.10.0-1160.83.1.el7      updates   8.2 M
 kernel-tools-libs            x86_64  3.10.0-1160.83.1.el7      updates   8.1 M
 python-perf                  x86_64  3.10.0-1160.83.1.el7      updates   8.2 M
 sudo                         x86_64  1.8.23-10.el7_9.3         updates   844 k
 xorg-x11-server-Xvfb         x86_64  1.20.4-21.el7_9           updates   857 k
 xorg-x11-server-common       x86_64  1.20.4-21.el7_9           updates    57 k
Removing:
 kernel                       x86_64  3.10.0-1160.45.1.el7      @updates   64 M
 kernel-devel                 x86_64  3.10.0-1160.45.1.el7      @updates   38 M

Transaction Summary
================================================================================
Install   2 Packages
Upgrade  17 Packages
Remove    2 Packages

Total size: 144 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test


Transaction check error:
  installing package python-perf-3.10.0-1160.83.1.el7.x86_64 needs 23MB on the / filesystem
  installing package sudo-1.8.23-10.el7_9.3.x86_64 needs 26MB on the / filesystem
  installing package kernel-3.10.0-1160.83.1.el7.x86_64 needs 106MB on the / filesystem
  installing package bind-export-libs-32:9.11.4-26.P2.el7_9.13.x86_64 needs 109MB on the / filesystem

Error Summary
-------------
Disk Requirements:
  At least 109MB more space needed on the / filesystem.

[root at dogmeat ~]# df -h
Filesystem                              Size  Used Avail Use% Mounted on
devtmpfs                                3.8G     0  3.8G   0% /dev
tmpfs                                   3.9G  148K  3.9G   1% /dev/shm
tmpfs                                   3.9G   11M  3.8G   1% /run
tmpfs                                   3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/centos_ba--bog--v-root   41G   40G  355M 100% /
/dev/sda1                               497M  346M  151M  70% /boot
/dev/mapper/centos_ba--bog--v-home   20G   99M   20G   1% /home
tmpfs                                   779M     0  779M   0% /run/user/0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://muug.ca/pipermail/roundtable/attachments/20230205/2b177bf4/attachment-0001.htm>


More information about the Roundtable mailing list