UFS Identify Storage Space consumption

Hi

Running low on storage space.

How to identify the culprit folder(s) responsible consuming storage space to make a call on whether to archive/delete it's contents?

Running as low as a few hundred MiB in about 450 GiB, need to clear as much as possible!

Lately this has been a persistent issue, though have been doing pkg clean -a & pkg autoremove, still no luck.

Thanks
rraj
 
Try to find out which directory is eating all the space.
du -hs /* | grep G
du -hs /usr/local/* | grep G
du -hs /home/myuser/* /home/myuser/.??* | grep G

pkg clean
pkg clean -a
rm -vfR /home/myuser/.cache/*
rm -vfR /usr/ports/distfiles/*

To find the largest files in a directory,
du -ah . | sort -rh | head -n 20
 
You can try this command, on UFS for me it works (almost ...).
If you have running thin jails then stop them before executing the command otherwise going through symlinks shows wrong sizes obviously, I didn't find a way to avoid this behavior.
Anyway it should print the top 30 larger directories on the system, size is in Mb.
Code:
# find / -type d -print0 | xargs -0 du -xsm | sort -rn | head -n30

Or if you can then just install ncdu which is a tool made for this specific task, super easy to use and very light so installing it should not be a problem even with a low disk space.
 
Try to find out which directory is eating all the space.
du -hs /* | grep G
du -hs /usr/local/* | grep G
du -hs /home/myuser/* /home/myuser/.??* | grep G

pkg clean
pkg clean -a
rm -vfR /home/myuser/.cache/*
rm -vfR /usr/ports/distfiles/*

To find the largest files in a directory,
du -ah . | sort -rh | head -n 20
Hi Alain De Vos

ncdu reveals
Code:
/usr/home/rraj/.local/share
is the directory with maximum storage space consumption.

du -ah. | sort -rh \ head -n 20 gives following output:
Code:
[rraj@localhost /usr/home/rraj/.local/share]$ du -ah . | sort -rh | head -n 20
 96G    ./Mizutamari
 96G    .
 60G    ./Mizutamari/Games
 33G    ./Mizutamari/Programs
6.2G    ./Mizutamari/Games/Legacy-Games/dosdevices/c:
6.2G    ./Mizutamari/Games/Legacy-Games/dosdevices
6.2G    ./Mizutamari/Games/Legacy-Games
4.2G    ./Mizutamari/Games/Burnout-Paradise-Demo
3.9G    ./Mizutamari/Games/CurseForge/drive_c
3.9G    ./Mizutamari/Games/CurseForge
3.8G    ./Mizutamari/Games/Epic-Games/drive_c
3.8G    ./Mizutamari/Games/Epic-Games
3.5G    ./Mizutamari/Games/Legacy-Games/dosdevices/c:/windows
3.4G    ./Mizutamari/Programs/FL-Studio/drive_c
3.4G    ./Mizutamari/Programs/FL-Studio
3.1G    ./Mizutamari/Games/Factorio-Demo/drive_c
3.1G    ./Mizutamari/Games/Factorio-Demo
2.8G    ./Mizutamari/Cache
2.7G    ./Mizutamari/Games/Ankama/drive_c
2.7G    ./Mizutamari/Games/Ankama

What all can i delete safely given i want to keep the port Mizutamari(pkg Mizuma) i.e. a lean ~/share sub-directory? First four sub-folders are the target!

Thanks
rraj
 
According to google A.I.,

  • Resetting Settings: Deleting this folder will remove your custom configurations, such as your preferred Wine paths or global tool settings, and return the application to its default state.
  • Application Data: This specific directory usually contains only configuration files (like Mizutamari.conf). Your actual installed Windows applications and their data are typically stored in a separate directory, often located at $HOME/.local/share/Mizutamari.
  • Regeneration: If you run Mizutamari again after deleting the folder, it will recreate the necessary configuration files with default settings.
 
Running as low as a few hundred MiB in about 450 GiB, need to clear as much as possible!
ncdu reveals
Code:
/usr/home/rraj/.local/share
is the directory with maximum storage space consumption.

du -ah. | sort -rh \ head -n 20 gives following output:
Code:
[rraj@localhost /usr/home/rraj/.local/share]$ du -ah . | sort -rh | head -n 20
 96G    ./Mizutamari
 96G    .
 60G    ./Mizutamari/Games
 33G    ./Mizutamari/Programs
6.2G    ./Mizutamari/Games/Legacy-Games/dosdevices/c:
6.2G    ./Mizutamari/Games/Legacy-Games/dosdevices
6.2G    ./Mizutamari/Games/Legacy-Games
4.2G    ./Mizutamari/Games/Burnout-Paradise-Demo
3.9G    ./Mizutamari/Games/CurseForge/drive_c
3.9G    ./Mizutamari/Games/CurseForge
3.8G    ./Mizutamari/Games/Epic-Games/drive_c
3.8G    ./Mizutamari/Games/Epic-Games
3.5G    ./Mizutamari/Games/Legacy-Games/dosdevices/c:/windows
3.4G    ./Mizutamari/Programs/FL-Studio/drive_c
3.4G    ./Mizutamari/Programs/FL-Studio
3.1G    ./Mizutamari/Games/Factorio-Demo/drive_c
3.1G    ./Mizutamari/Games/Factorio-Demo
2.8G    ./Mizutamari/Cache
2.7G    ./Mizutamari/Games/Ankama/drive_c
2.7G    ./Mizutamari/Games/Ankama

If your 450G disk is full and you only found a 96G directory, I would say that something is missing.
 
we were looking for missing space on one of our openbsd machines and it turns out there were files on the mount point underlying /usr that were hidden when /usr was mounted. so we had to take the machine down to single-user and unmount that partition and remove the files there.
 
Back
Top