Browse help topics

Server Management

How to Find Large Files and Fix a Full Disk

On a VPS, run df -h to see which disk is full, then du and find to locate the biggest folders and files. Delete only files you created and recognize. On Shared Web Hosting, open the Disk Usage tab under Files in cPanel.

  • Updated
  • Last reviewed
  • Intermediate
  • About 20 minutes

Applies to: cPanel Linux Blue Arctic VPS Hosting and Virtual Dedicated Servers (VDS); Blue Arctic Shared Web Hosting (cPanel)

On this page
  1. On a VPS: find what’s using the space
  2. On a VPS: free space safely
  3. On Shared Web Hosting: use cPanel
  4. How to tell it worked
  5. Troubleshooting
  6. Still need help?

When a disk fills up, websites stop saving data, email bounces and services can fail to start. You might see “No space left on device”. First find what’s using the space, then remove only what you’re sure about. On Shared Web Hosting, skip to “On Shared Web Hosting: use cPanel”.

Warning

Delete only files you created and recognize, such as old site archives, downloads or database exports. Never delete anything under /usr, /boot, /etc, /var/lib (databases live there) or mail folders, or any backup folder you didn’t create. If you’re not sure, open a support ticket first. Before you delete anything, copy what you might need later to your own computer: in File Manager, select it and click Download (Shared Web Hosting), or use an SFTP program (VPS).

On a VPS: find what’s using the space

  1. Run df -h and note which line is near 100% in the Use% column. / is the main disk.
  2. Run df -i. If IUse% is near 100%, the problem is the number of files, not their size; look for folders full of small files, such as caches or session files.
  3. List the biggest top-level folders on the main disk. This only reads, but it can take a few minutes; wait until the prompt comes back.
    sudo du -xh -d 1 / 2>/dev/null | sort -h
    The largest are at the bottom. -x stays on this disk, 2>/dev/null hides “permission denied” messages and sort -h sorts by size. If you’re logged in as root, you can leave out sudo.
  4. Repeat with the biggest folder, for example sudo du -xh -d 1 /home 2>/dev/null | sort -h, until you reach the files.
  5. Or list single files over 500 MB (this also only reads):
    sudo find / -xdev -type f -size +500M -exec ls -lh {} + 2>/dev/null

On a VPS: free space safely

Warning

rm deletes files for good. There’s no trash and no undo. Delete one file at a time, using its full path. Don’t use rm -r, rm -rf or * unless support tells you to.

  • Your own old files: remove archives, exports and downloads you no longer need, for example rm /home/username/old-site.zip. Check the path before you press Enter.
  • System journal (the system’s log): check its size with sudo journalctl --disk-usage. To remove archived entries older than two weeks, run sudo journalctl --vacuum-time=2weeks. This deletes only those old log entries.
  • Anything else, such as large logs, database files or mail: don’t delete it yourself. Open a support ticket. Not sure whether the work is covered by your plan? Open the ticket and we’ll tell you.

Deleting a file that a program still has open doesn’t free the space until that program restarts.

On Shared Web Hosting: use cPanel

Warning

Deleting in File Manager is permanent. Download a copy of anything you might need before you delete it.

  1. Log in to cPanel. If you’re not sure how, open a support ticket.
  2. Click Files in the sidebar and open the Disk Usage tab. If you see a Disk Usage icon instead, click it. Or type its name in cPanel’s search box (Ctrl+K or Cmd+K). If you can’t find it, open a support ticket.
  3. Under Largest Directories, see which folders use the most space. Click a folder to open it in the File Manager tab. To see hidden folders, click More in the toolbar and select Show hidden files.
  4. Select files you no longer need and click Delete.
  5. If your File Manager shows a trash with items in it, emptying it may free more space. Do it only when you’re sure; it can’t be undone.
  6. Mailboxes often use a lot of space. To see which ones, click Email in the sidebar; the list shows the space each one uses. In Webmail, empty your trash and junk folders and delete old messages with large attachments.

The figures in Disk Usage can take a while to update after you delete files.

How to tell it worked

On a VPS, df -h shows Use% well below 90%. In cPanel, your disk usage figure drops once it refreshes. Your site saves changes and email arrives again.

Troubleshooting

  • You deleted a big file but df shows no change: a running program still has it open. Restart that service (see how to restart a Linux service) or open a support ticket.
  • The disk fills again quickly: something keeps writing, often a log or a backup job. Run the du steps again a day later and compare.
  • You need more space: on a VPS, adding storage is a plan change; open a support ticket to ask. On Shared Web Hosting, ask us about a larger plan.

Still need help?

Open a support ticket from the Client Portal at my.bluearctic.com. Our support page explains how the 24/7 helpdesk works. Include your domain or VPS IP address, the output of df -h and df -i (VPS), the folders that look largest, and what you already removed. Never include a password or a private key.

Was this article helpful?

Report outdated instructions or suggest an improvement
Type of report

Please do not include passwords or personal information.

Still need help?

Our support team can look into your account and walk you through it.