Skip to main content

GoDaddy Help

Remove excessive inodes

Disk space issues can be caused by large files or too many inodes. Inodes store information about files and directories (folders), such as file ownership, access mode (read, write, execute permissions), and file type. The maximum number of inodes, like disk space, is set when the server is created.

If you have not yet found areas of high inode use, see find inode usage.

Warning: This article is intended for advanced SSH users. If you don't know the purpose of a file or folder, don't remove it. Removing system files or directories is irreversible and may break the server (taking all of the sites down).

Do not attempt to remove files from the /home/virtfs directory. This directory is a virtual file system used by WHM/cPanel and doesn't actually use disk space.

  1. Enable administrator access on your Gen 3 or Gen 4 server if you haven't already done so.
  2. Connect to my server with SSH (Secure Shell).
  3. Switch to the root user.
  4. Use cd to move into the directory with the inode issue before running any commands to remove files.
  5. There are several ways to remove multiple files. The following are a few common methods.

    If you run a command and receive an error like /bin/rm: Argument list too long, you will need to be more specific with your command (ie. files older than 14 days instead of all files).

    To remove all of the files within a directory:

    find /path/to/directory -type f -exec rm -f {} \;

    Use -mtime to search for and remove specific files older than 14 days:

    find /tmp -type f -mtime +14 -exec rm -f {} \;

    Use -name to remove files that use the naming convention 'sess_{randomstring}':

    find /var/cpanel/php/sessions/ea-php73 -type f -name 'sess*' -exec rm -f {} \;

    Use -mmin to remove all files older than 30 minutes:

    find /var/cpanel/php/sessions/ea-php73 -type f -mmin +30 -name 'sess*' -exec rm -f {} \;

    To completely remove a directory and all of it's contents (use with extreme caution):

    rm -rf /path/to/directory
  6. Reboot your Gen 3 or Gen 4 server.

Next steps

More info

  • Our server experts can perform these steps for a fee. For more information about our Expert Services, please visit our Expert Service menu


Community Related

emily0003's Avatar
Problem with number of inodes in Linux shared hosting

2 Replies

Last posted about 4 years ago.

doell's Avatar
Problem with Inodes on VPS

6 Replies

Last posted about 2 years ago.

vpbay's Avatar
How to increase file inodes limits?

2 Replies

Last posted about 4 years ago.

TnTodd's Avatar
Problem with Inodes on VPS

1 Replies

Last posted almost 5 years ago.

pasaytenpete's Avatar
Controlling Whitespace

2 Replies

Last posted almost 3 years ago.

Don't see what you are looking for? Search the Community