# My disk is full (and it took my website or database down)
Source: https://vpsdime.com/knowledgebase/troubleshooting/disk-full
Last reviewed: 2026-07-02
Summary: A full disk rarely announces itself, it shows up as a website suddenly offline, MySQL/MariaDB refusing to start or going read-only ("No space left on device", errno 28), or apps crashing on write. How to confirm with df -h, find what's eating the space, clean it safely, and keep it from recurring.

## What this is

A full disk almost never *says* "disk full". It says something else:

- your **website is suddenly offline**, throwing 500 errors or blank pages,
- **MySQL/MariaDB won't start**, crashes, or goes read-only, logs show `Disk full (errno 28)` or `No space left on device`,
- your **app crashes** whenever it writes (uploads, sessions, caches, queues),
- cron jobs, updates, even logins misbehave in strange ways.

If a service died "for no reason", **check the disk before anything else.** It's a ten-second test and one of the most common hidden causes of "my site/app/database is down":

```
df -h
```

If a filesystem (usually `/`) shows **100%** (or 99%), you've found it. And if `df -h` shows **plenty free** yet writes still fail with "No space left on device", check `df -i`: you're likely **out of inodes** instead, millions of tiny files rather than big ones, which has [its own guide](https://vpsdime.com/knowledgebase/troubleshooting/out-of-inodes).

## Find what's eating the space

Work down from the root, largest first:

```
du -xhd1 / | sort -h
```

Then re-run it on the biggest directory (`du -xhd1 /var | sort -h`, and so on) until you find the culprit. If you'd rather browse interactively, `apt install ncdu` and run `ncdu -x /`.

The usual suspects, and how to clean each **safely**:

- **systemd journal logs.** Check with `journalctl --disk-usage`; shrink with `journalctl --vacuum-size=200M`, and cap it permanently with `SystemMaxUse=200M` in `/etc/systemd/journald.conf`.
- **Application and web-server logs** in `/var/log`. An app stuck in an error loop can write gigabytes overnight. Empty a huge live log with `: > /var/log/thefile.log` (truncation) rather than deleting it, a deleted file that a running service still holds open **keeps occupying space** until the service restarts. (Find those ghosts with `lsof +L1`.)
- **Docker.** Check with `docker system df`. Old images, stopped containers, unused volumes, and unbounded container logs add up fast. `docker system prune` clears the safe stuff; add `-a` to also drop unused images (they'll re-download on next use). Cap container logs going forward with log rotation in `/etc/docker/daemon.json`.
- **Package caches:** `apt clean` (or `dnf clean all`).
- **Old dumps and backups** parked in `/var/backups`, `/root`, or your home directory, ship them [off-site](https://vpsdime.com/knowledgebase/getting-started/backing-up-your-vps) instead of hoarding them on the disk they're supposed to protect.

## What NOT to do

- **Don't delete things you can't identify**, especially anything under `/var/lib` (that's where your **databases live**, `/var/lib/mysql` is your data, not clutter), `/usr`, or `/etc`. Freeing space by deleting the wrong file turns an outage into data loss.
- Don't bulk-delete in `/tmp` on a live system without looking, running services may be mid-write there.
- Not sure what something is? Ask us, or [ask an AI chatbot](https://vpsdime.com/knowledgebase/support-coverage/software-and-server-management) with the exact path, before removing it.

## After you've freed space

Restart whatever fell over, databases especially don't recover from a full disk until restarted:

```
systemctl restart mariadb    # or mysql, postgresql, nginx, your app...
systemctl status mariadb
```

Then load your site and confirm. If MySQL/MariaDB won't come back cleanly after an errno-28 incident, stop, don't experiment against your only copy of the data, follow [the safe recovery order](https://vpsdime.com/knowledgebase/troubleshooting/mysql-wont-start), and [open a ticket](https://vpsdime.com/open-ticket/) with the exact log lines if it doesn't recover.

## Keep it from happening again

- **Log rotation is your friend:** logrotate handles `/var/log` by default, but confirm your app's own logs are covered, and cap journald and Docker logs as above.
- **Glance at the disk graph** on your VPS's [Graphs](https://vpsdime.com/knowledgebase/client-area/services/graphs) tab now and then, disk usage grows slowly and visibly; catching it at 85% is painless.
- **Genuinely need more room?** [Additional Storage](https://vpsdime.com/knowledgebase/client-area/services/extra-features) adds disk without changing your plan, or [upgrade](https://vpsdime.com/knowledgebase/client-area/services/upgrade-downgrade) if everything is getting tight.

## Related questions

- "My website suddenly went down, could the disk be full?"
- "MySQL won't start and says disk full (errno 28), what do I do?"
- "How do I find what's using all my disk space?"
- "Is it safe to delete Docker images or journal logs?"
- "Why does it say no space left when the disk isn't full (inodes)?"
- "How do I add more disk space to my VPS?"
