clean linux

Retour

remove tilde files (from emacs)

find . -name '*~' -print -delete

remove # files (from emacs force quit)

find . -name '#*#' -print -delete

empty old kernels / installs

apt-get clean
apt-get autoclean
apt autoremove -y

empty journal logs

journalctl --vacuum-time=10d

empty gziped logs

find /var/log -type f -name '*.gz' -print -delete

remove old images

docker image prune -a
docker image prune -a --filter "until=24h"

clean docker

remove old volumes / stopped containers / build cache / images / networks

docker volume prune -f
docker system prune -f

inspecting

du . --max-depth=1 | sort -n -r | head -n 10
ncdu