Help Center
Delete unnecessary files from the /tmp partition
The /tmp partition on a Linux server is used to temporarily store files while various tasks are running. It's important to ensure that this partition doesn't fill up, as it can affect system performance and lead to unexpected issues.
In this tutorial, we will show you how to delete files from the last 12 hours in the /tmp partition. By freeing up space in this partition, you ensure efficient operation of your server and avoid potential errors or interruptions.
Follow the instructions below to clean the /tmp partition and keep your server in optimal condition. Remember to exercise caution when deleting files and make sure you don't need any important data that may be stored in the partition.
Simply log in via SSH and execute the following command:
tmpwatch -am 12 /tmp
This will delete all files older than 12 hours, meaning it will only retain files from the past 12 hours at the time of execution, and the rest will be discarded.
Ready! You have deleted files from the last 12 hours in the /tmp partition of your Linux server. This procedure can help free up disk space and maintain the optimal performance of your server. Remember to exercise caution when performing file deletion operations to avoid accidentally deleting important data.
Related articles
- Screen command in CentOs: more efficient sessions
- Solution: 'Service Unavailable' on CloudLinux servers
- Database export via command line
- Protect your data: configure RAID notifications with S.M.A.R.T.
- List CronJobs for all cPanel users
- Change reserved disk space in CentOS
- Know your hardware: get accurate information on CentOS 7
- Basic SSH commands
- Optimize accounts with manual rearrange
- IP blocking in CSF via command line
- Clear DNS cache: solution to resolution problems
- Change file permissions via command line
- How to open and close ports using CSF in WHM?
- How to Modify the Hosts File in Windows, Linux, and macOS
- How to Use Telnet to Test SMTP Connectivity on Port 25
- Adjusting reserved space on Linux disks
- Adjusting reconstruction speed in RAID on Linux
- Where are NGINX logs stored?
- Configuring RAID failure notifications with mdadm
- Differences between Legacy VPS and Cloud VPS
- Install cPanel in your server or VPS
- How to send emails via SSH?
- Manage screen session