How to Delete Hidden Files and .trash Folder in cPanel to Free Up Disk Space
On your shared Linux hosting server, hidden subdirectories like .trash
created by cPanel may occupy significant disk space if left unchecked.
What are hidden files?
Most of them are similar to your computer's Recycle Bin—they store deleted files, removed emails, obsolete backups, or temporary data.
If you have an application that automatically deletes files, they may end up in .trash
and quickly consume disk space.
Is it safe to delete files in hidden directories?
Yes, with caution. If you're aware of what's inside the .trash
folder, it's safe to remove its contents.
Warning: Not all hidden files are trash. Files like .htaccess
are crucial for website functionality. Do not delete them!
How to delete files from the .trash folder
- Log into your cPanel account
- Go to Files > Disk Usage
- Scroll down and click Sort directories
- Locate the
.trash
folder, click it, and remove unwanted files
You can also use the "Empty Trash" function directly from File Manager to clear the contents.
Tip
We recommend performing this cleanup regularly to prevent unnecessary disk space consumption—especially if you manage dynamic sites or high-volume email accounts.