
The error No space left on device means one of two things: the space has run out, or the inodes have (the number of files the disk will accept). Check both with df -h and df -i; then find the guilty folder with du. On an unmanaged VPS cleaning up is yours, and worth doing quickly: with a full disk services stop writing, databases can corrupt and even SSH can refuse you.
Step by step
|
|
|
|
|
The usual suspects
| Where | What to do |
| /var/log (logs) | See what is big and whether logrotate handles it: where the logs are. To empty a log that is in use, sudo truncate -s 0 /var/log/file.log is safer than deleting it. |
| The systemd journal | journalctl --disk-usage and, if large, sudo journalctl --vacuum-size=200M (example). |
| Package cache (Debian/Ubuntu) | sudo apt clean and sudo apt autoremove (the latter removes packages nobody uses any more; read the list before accepting). |
| /var/lib/docker | Images, volumes and container logs: Docker filling the disk. |
| Backups on the server itself | A copy on the same disk takes space and is lost with it. Move it elsewhere: copying with rsync. |
| Sessions, caches and applications’ temporary files | Usually the ones that use up inodes. Each application has its own folder; check its documentation before clearing. |
| Databases | Binary logs and tables that grew. See the database has grown. |
| Deleted a huge file and the space did not return? A program probably still has it open, and the system frees the space only when it closes it. sudo lsof +L1 lists those files (install lsof if missing) and shows the program; restart that service and the space comes back. |
| Do not delete blindly outside what you recognise. /boot, /usr, /lib and /etc belong to the system. An rm -rf with a stray space in the path is the fastest way to a server reinstall (reinstalling the operating system). |
| If the disk is too small for what you do, the answer is not cleaning every week. Check the plan page and your service in Meu Interweb to see what the plan allows for space, or put the heavy data elsewhere. To watch what grows over time, see seeing what uses CPU, memory and disk. |
|
Cannot get in over SSH because the disk is full? The panel console gets you in without the network; tell us what you see. Open a support ticket |
|
SEE ALSO Where the logs are on a Linux VPS |
RECOMMENDED PRODUCT VPS server with root access Resources of your own, the OS you choose, reinstall whenever you like. from 7.560,00 Kz/mo (3-year plan, with coupon) See plans |
- 0 Users Found This Useful











