VPS disk is full: what to delete

When the disk is full, databases, email and the panel stop working. First find what took the space, and only then delete.

How much is free

df -h /

The same in the panel: "Navigation board" → "System information".

System information: disk
System information: disk

What took the space

du -xh --max-depth=1 / 2>/dev/null | sort -h | tail -15
du -xh --max-depth=1 /var 2>/dev/null | sort -h | tail -10
du -sh /var/www/*/data/www/* 2>/dev/null | sort -h | tail -10
FolderWhat is thereWhat to do
/var/logsystem logsjournalctl --vacuum-size=200M; old *.gz can be deleted
/var/www/httpd-logssite logsclear big *.log: truncate -s 0 file (deleting the file does not free space while the web server holds it)
/usr/local/mgr5/var/backuptemporary panel backup filescheck the backup storage: copies must go to backup.vps-dns.info
/var/cache/apt, /var/cache/dnfpackage cacheapt clean / dnf clean all
/var/lib/dockerDocker images and containersdocker system prune — removes stopped containers and unused images
/var/lib/mysqldatabasesbig log tables in site databases (statistics, plugin logs) — clean them in the CMS
/var/www/*/data/emailemailask mailbox owners to delete old messages or set mailbox quotas

Do not delete files in /var/lib/mysql, /usr/local/mgr5 and system folders manually — you will break the databases and the panel.

If space is constantly short

Contact support — we will tell you how to increase the VPS disk.

Questions and answers
The web server keeps the file open. Clear logs with truncate -s 0 or restart the service.
The package cache (apt clean), old journals (journalctl --vacuum-size), unused Docker images (docker system prune).