Clean: Which folder takes most space (ncdu)?

NCurses Disk Usage (ncdu) / dutree / v2 / git

alias from CLI: improved

alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules"

see also

  • gdu - Pretty fast disk usage analyzer written in Go.
  • diskus

How to Exclude a Specific Directory

$ ncdu -x / --exclude /home/		# analyse space on / without considering /home

du

$ du -sh backup-lr-May-02-2017-1493723588.tar.gz

-s, --summarize
            display only a total for each argument
-h, --human-readable
            print sizes in human readable format (e.g., 1K 234M 2G)

Cleaning

Trash

Systemd Journal Logs

Docker

$ docker system prune -a  --volumes

dpkg: How to purge previously only removed packages?

$ dpkg --get-selections | awk '$2 == "deinstall" {print $1}' | xargs sudo apt-get purge --dry-run

linux disk utilization statistics, i want to track last 30 day logs growth

#/bin/sh
echo `date -I`  `du -sh /home/$USER` >> /home/$USER/disk.usage
Written on July 11, 2018, Last update on November 3, 2023
system disk cli shell clean