Vultr DocsLatest Content

Associated Doc

How Do I Fix Disk Space Issues on My Vultr Compute Instance?

Updated on 15 September, 2025

Troubleshooting and resolving disk space limitations on Vultr Compute instances to restore normal server functionality.


When the disk space on a Vultr Compute instance becomes full, it can interfere with normal server functionality. Common issues include database write failures, inability to view application logs, problems with changing the instance plan, and degraded instance performance. Clearing space on the instance's hard disk allows it to function normally again.

To free up disk space, you need to access your instance via SSH. However, in some cases, SSH access may fail due to the disk being completely full leaving no space even to initiate a session. If this happens, follow these steps:

  1. Mount the SystemRescue OS on your instance through the Vultr Customer Portal and boot into it.

  2. Mount the root block storage.

  3. Use the chroot utility to access the root volume of your instance.

  4. From within the chroot environment, check the disk space usage.

    console
    $ du -h --max-depth=1 /var
    

    Output:

    4.0K    /var/local
    4.0K    /var/snap
    16K     /var/spool
    4.3G    /var/lib
    261M    /var/cache
    48K     /var/crash
    56K     /var/tmp
    1.8M    /var/backups
    4.0K    /var/opt
    12K     /var/www
    4.0K    /var/mail
    298M    /var/log
    4.8G    /var

    This command lists the top-level directories inside /var and how much space each is using. The -h flag shows the output in a human-readable format (e.g., K, M, G), and --max-depth=1 limits the listing to just the top-level folders. You can change the path or increase the depth to assess other parts of the file system.

  5. After identifying which directories are using the most space, use the ls command with the -larSh flags to list individual files by size.

    console
    $ ls -larSh /var/log/
    

    This command lists all files in the /var/log/ directory, sorted by size in descending order.

Common Causes of Disk Space Usage

Rapid disk usage growth is often due to log files or application data piling up under /var. This directory frequently contains system logs, web server files, and databases, making it one of the most common sources of disk space issues.

Deleting Unnecessary Files

After you identify large files or directories, remove them with the following commands:

  • To delete a file:

    console
    $ rm /path/to/your/file
    
  • To delete an empty directory:

    console
    $ rm -d /path/to/a/directory
    
Note
Be careful when deleting files. Avoid removing essential system files that may impact the instance's functionality.

After deleting old logs, unwanted software, unnecessary packages, or rotated log files, verify the available disk space using the df command:

console
$ df -h

Output:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda2        30G   23G    7G  77% /
/dev/vda1       511M  6.2M  505M   2% /boot/efi

This output shows each mounted file system’s total size, used space, available space, and usage percentage. The /dev/vda2 device typically represents your instance's main disk.

Alternate Solution Without Deleting Any Data

In some cases, due to organizational compliance or audit requirements, you may not be allowed to delete any log files or application data for example, if logs must be retained for up to 180 days.

In such scenarios, you can attach a Block Storage volume to your instance and move non-critical data or large log files to the new volume. This approach helps you free up space on your primary disk without violating data retention policies.

Note
Always stop any services writing to the data (e.g., MySQL, Apache) before moving the files, and ensure correct permissions are preserved on the mounted volume.