How do I recover access to a Droplet that is at 100% disk usage?

If you can’t log into your Droplet using a password or SSH key that worked previously, even after trying a password reset and trying to connect with the recovery console, the issue may be that your Droplet’s disk space usage is at 100%.

Warning
If you can’t log in and you think your Droplet’s disk usage is at 100%, do not upgrade the Droplet to a larger disk size before following the steps in this article. When there is no remaining disk space, the filesystem table (fstab) can’t update to make the additional disk space from a resize available.

In this situation, you need to boot your Droplet from the recovery ISO, then use the recovery console to access your Droplet.

  1. First, boot your Droplet from the recovery ISO using the recovery ISO instructions. Booting from the recovery ISO doesn’t require a working password.

  2. Next, log in with the Recovery Console.

  3. Connect to your Droplet using the Recovery Console. Enter 1 to mount, then 5 to chroot into the Droplet.

  4. Check if the mounted filesystem is at 100% usage by running the following command:

    df -h
    

    You can also use du -h for additional information on disk usage.

  5. If the mounted filesystem is at 100% usage, this confirms the issue is related to disk space. The next step is to determine where the space is being used. We recommend starting at /, the root directory, and running the following command to list each directory one level below / with their sizes.

    du -h --max-depth=1
    

    From here, you can then change directories (with cd) and run the command again to find where the space is being used.

  6. Once you locate where the largest files and directories are, you need to delete some files (with rm) to free up space. Often, the cause of disk space issues are old log files, which are generally safe to delete.

  7. After you delete files to free up space, if you previously tried to reset your password or otherwise need to change it, you can do so now using passwd.

  8. Finally, boot your Droplet from its hard drive. This follows the same process as booting from the recovery ISO, but choose Boot from Hard Drive instead.

  9. When the Droplet boots, try connecting to it normally using your password or SSH keys.

  10. Optionally, after you regain access to the Droplet, you can now resize the Droplet to add more disk space to prevent this issue in the future. If the cause of the problem was log files, you can set up log rotation.

If you’re still having trouble accessing your Droplet, contact support.