Mantenimiento de mi Ubuntu

Docker, conforme se trabaja dentro de una imagen docker va creando copias del contenedor llenando el disco rápidamente

Elimino imagenes que no tengan asociado algún contenedor

docker image prune --all

Elimino cache y copias overlay que no se use

docker system prune -a

Eliminar volúmenes huérfanos

docker volume rm $(docker volume ls -qf dangling=true)

Journal

 First open terminal from system app launcher, and you may run command to check out the current disk usage of all journal files:

journalctl --disk-usage

If you decide to clear the logs, run command to rotate the journal files. All currently active journal files will be marked as archived, so that they are never written to in future.

sudo journalctl --rotate

Now clear the journal logs by choosing one of following commands:

Delete journal logs older than X days:

sudo journalctl --vacuum-time=2days

Delete log files until the disk space taken falls below the specified size:

sudo journalctl --vacuum-size=100M

Delete old logs and limit file number to X:

sudo journalctl --vacuum-files=5