/tmp Folder 100% Full in Linux – Complete Troubleshooting Guide for Linux & Oracle DBAs
/tmp Folder 100% Full in Linux — Troubleshooting Guide
Practical Linux and Oracle DBA guide to diagnose a full /tmp filesystem, identify the cause, safely recover space, and prevent the problem from recurring.
Last Updated: September 2026
A 100% full /tmp filesystem can cause Linux applications, Oracle Database utilities, installers, patching tools, scripts, and other processes to fail when they cannot create temporary files.
The correct solution is not simply to delete everything under /tmp. First determine whether the filesystem is full because of disk-space consumption, inode exhaustion, deleted files still held open by processes, or another filesystem-level condition.
If Oracle software is already installed, do not blindly remove /tmp/.oracle or /var/tmp/.oracle. Oracle's installation documentation specifically warns against removing these directories or their files after Oracle software installation.
Symptoms of a Full /tmp Filesystem
A full /tmp filesystem can produce different symptoms depending on the application and operation being performed.
- Applications fail to create temporary files.
- Oracle installation or configuration operations fail.
- Oracle utilities report temporary-file or operating-system errors.
- Shell scripts fail when creating temporary files.
- System services fail to start or complete an operation.
- Package installation or update operations may fail.
- Applications report “No space left on device”.
- Processes experience unexpected failures when writing temporary data.
Step 1 — Check /tmp Filesystem Usage
Start by checking the filesystem containing /tmp:
df -h /tmp
A typical result may look similar to:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-tmp
10G 10G 0 100% /tmp
The important columns are Used, Avail, and Use%.
Oracle's Linux installation documentation also uses df -h /tmp to determine the available space in the temporary filesystem.
Step 2 — Check All Filesystems
Sometimes /tmp is not a separate filesystem. In that situation, the problem may actually be with the root filesystem or another mount point.
df -h
Review all mounted filesystems and identify any filesystem approaching 100% utilization.
Step 3 — Check Whether the Problem Is Inodes
A filesystem can run out of inodes even when some disk space remains available. This commonly occurs when a very large number of small files are created.
Check inode utilization with:
df -i /tmp
Look at the IUse% column.
If inode utilization is 100%, deleting a few large files may not solve the problem. You need to identify and remove unnecessary files in accordance with your system's operational and application requirements.
The Linux df command supports the -i option specifically for reporting inode usage.
Step 4 — Identify What Is Consuming Space
After confirming that /tmp is full because of disk usage, identify the largest directories and files.
A useful first check is:
du -sh /tmp/* 2>/dev/null | sort -h
This helps identify which entries under /tmp are consuming the most space.
The du command measures usage within a directory hierarchy, while df reports filesystem-level usage. These values can differ for several reasons, so both commands are useful during troubleshooting.
Step 5 — Find Large Files in /tmp
To identify large files without crossing into another mounted filesystem:
find /tmp -xdev -type f -size +100M -ls
You can adjust the threshold according to the environment. For example:
find /tmp -xdev -type f -size +500M -ls
Do not delete a file merely because it is large. First determine which application or process created it and whether it is still required.
Step 6 — Find Recently Modified Files
If the problem started recently, examining recently modified files can help identify the process or application responsible.
find /tmp -xdev -type f -mtime -1 -ls
This example searches for files modified within approximately the last day.
Step 7 — Check for Deleted Files Still Consuming Space
One of the most easily overlooked causes of “disk full” conditions is a deleted file that is still held open by a running process.
Check for such files with:
lsof +L1
If a process still has an unlinked file open, the filesystem space may not be released until the process closes the file or terminates.
Before restarting or terminating a production process, identify the application owner and understand the operational impact.
Step 8 — Determine Whether /tmp Is a Separate Filesystem
Check how /tmp is mounted:
df -h /tmp
mount | grep ' /tmp '
You can also use:
findmnt /tmp
This distinction is important because if /tmp is part of the root filesystem, cleaning /tmp may recover space on /. If it is a dedicated filesystem, the impact and remediation approach are different.
Step 9 — Safely Review /tmp Contents
Before deleting anything, review the contents:
ls -lah /tmp
Look for:
- Large temporary files.
- Old application-generated files.
- Abandoned installation files.
- Unexpected directories consuming significant space.
- Files belonging to active applications.
- Oracle-related directories and files.
Step 10 — Do Not Blindly Run rm -rf /tmp/*
A commonly suggested command is:
rm -rf /tmp/*
Do not use this as a generic production troubleshooting procedure.
Removing files indiscriminately can interrupt applications, delete files required by active processes, or remove Oracle-related temporary resources.
Oracle specifically warns that after Oracle software installation, /tmp/.oracle and /var/tmp/.oracle should not be removed.
Never delete unknown files from /tmp on a production Oracle server simply because the filesystem is full. Identify the owner and purpose of the files first.
Step 11 — Remove Confirmed Unused Files
Once you have confirmed that a file is no longer required and is safe to remove, delete only the identified files or directories.
For example, if a specific unused file has been identified:
rm -f /tmp/example-unused-file
After cleanup, verify the available space:
df -h /tmp
Step 12 — Check the Result After Cleanup
Confirm both filesystem and inode utilization:
df -h /tmp
df -i /tmp
If the filesystem remains at or near 100%, continue investigating rather than repeatedly deleting files.
Step 13 — If Space Does Not Return After Deleting Files
If df still reports high usage after files have been deleted, check for deleted-but-open files:
lsof +L1
A process holding a deleted file open can continue consuming filesystem space until the file descriptor is released.
Coordinate any application restart or process termination through the appropriate production change procedure.
Step 14 — If /tmp Is Consistently Running Out of Space
If the filesystem repeatedly reaches high utilization during normal workload, investigate the underlying capacity requirement instead of treating each occurrence as a one-time cleanup event.
Possible approaches include:
- Increase the size of the filesystem where appropriate.
- Review application temporary-file behavior.
- Review automated cleanup policies.
- Redirect suitable temporary operations to another filesystem.
- Review Oracle installation or application requirements.
- Monitor filesystem utilization proactively.
Step 15 — Configure an Alternative Temporary Directory
Oracle documentation allows the Oracle user's TMP and TMPDIR environment variables to be set to another suitable filesystem when /tmp does not provide sufficient space.
For example:
export TMP=/u01/tmp
export TMPDIR=/u01/tmp
Before doing this, ensure the target filesystem has adequate capacity, appropriate permissions, and is suitable for the application or Oracle operation being performed.
For Oracle RAC installations, follow the Oracle Database version-specific installation requirements carefully; Oracle documentation includes specific restrictions regarding temporary directories and shared filesystems.
Step 16 — Oracle Installation and /tmp Requirements
Oracle installation procedures explicitly check available temporary space with:
df -h /tmp
If insufficient space is available, Oracle documents deleting unused files or configuring TMP and TMPDIR to use another appropriate filesystem.
The exact temporary-space requirement depends on the Oracle product, release, installation method, and operation being performed. Always check the installation guide for the specific Oracle version.
Step 17 — Oracle-Specific Files That Require Caution
On Oracle database servers, do not assume every file or directory under /tmp is disposable.
In particular, Oracle's installation documentation states that after Oracle software has been installed, the following should not be removed:
/tmp/.oracle
/var/tmp/.oracle
Treat these paths as protected Oracle resources during troubleshooting.
Step 18 — Check for Applications Generating Temporary Files
If /tmp repeatedly fills up, identify the application responsible rather than repeatedly cleaning the filesystem.
Review:
- Oracle Database processes.
- Oracle client utilities.
- Oracle E-Business Suite processes.
- Application servers.
- Backup and recovery utilities.
- Installation and patching processes.
- Custom shell scripts.
- Scheduled jobs and cron tasks.
- Log-processing or data-export scripts.
Step 19 — Monitor /tmp Usage
A simple monitoring command is:
df -h /tmp
For a quick repeated check:
watch -n 10 'df -h /tmp'
This displays /tmp utilization every 10 seconds and can help identify rapidly increasing usage during troubleshooting.
Common Causes of a 100% Full /tmp Filesystem
| Cause | What to Check |
|---|---|
| Large temporary files | du, find |
| Too many small files | df -i |
| Deleted files still open | lsof +L1 |
| Application-generated temporary data | Application logs and process ownership |
| Insufficient filesystem capacity | df -h |
| Oracle temporary resources | Oracle-specific files and processes |
Recommended Troubleshooting Sequence
- Check
df -h /tmp. - Check
df -i /tmp. - Determine whether
/tmpis a separate filesystem. - Use
duto identify space-consuming directories. - Use
findto identify unusually large files. - Check recently created or modified files.
- Check for deleted-but-open files using
lsof +L1. - Identify the application or process responsible.
- Protect Oracle-specific directories and files.
- Remove only confirmed unused files.
- Verify filesystem and inode utilization after cleanup.
- If the problem is recurring, address capacity or application behavior.
Frequently Asked Questions
Why is my /tmp folder 100% full?
Common reasons include large temporary files, a very large number of small files, applications generating temporary data, or deleted files that are still held open by processes.
How do I check /tmp disk usage?
df -h /tmp
How do I check whether /tmp has run out of inodes?
df -i /tmp
Can I delete everything under /tmp?
Do not blindly delete everything. Identify unused files first and consider active applications and Oracle-specific resources. In particular, Oracle documentation warns against removing /tmp/.oracle and /var/tmp/.oracle after Oracle software installation.
What should I do if df shows 100% but du does not?
Investigate deleted-but-open files with:
lsof +L1
The difference can also be related to filesystem behavior, mounts, reserved space, or other filesystem-level conditions.
Can I move Oracle temporary files to another filesystem?
For suitable Oracle installation or client operations, Oracle documents using the TMP and TMPDIR environment variables to specify another temporary directory when /tmp does not provide sufficient space. Follow the documentation for your specific Oracle release and operation.
Should I increase the size of /tmp?
If normal workload requirements repeatedly exceed the current capacity, increasing the filesystem size may be appropriate. However, first identify what is consuming the space and whether the growth is expected.
Final Linux DBA Checklist
- ☐ Run
df -h /tmp. - ☐ Run
df -i /tmp. - ☐ Check all filesystems with
df -h. - ☐ Determine whether
/tmpis separately mounted. - ☐ Identify large directories with
du. - ☐ Identify large files with
find. - ☐ Check for deleted-but-open files with
lsof +L1. - ☐ Identify the process or application responsible.
- ☐ Do not blindly execute
rm -rf /tmp/*on production. - ☐ Do not remove Oracle's
.oracledirectories after installation. - ☐ Remove only confirmed unused files.
- ☐ Verify space and inode utilization after cleanup.
- ☐ Investigate recurring growth instead of repeatedly deleting files.
- ☐ Increase filesystem capacity when justified by workload requirements.
Conclusion
A 100% full /tmp filesystem should be investigated systematically. Start with df -h /tmp and df -i /tmp, determine whether the problem is disk space or inode exhaustion, identify the files or processes responsible, and clean up only resources that are confirmed to be safe to remove.
On Oracle Linux and Oracle Database servers, take additional care with Oracle-related temporary resources. A safe DBA approach is to diagnose the filesystem first, protect active Oracle resources, correct the underlying cause, and then introduce appropriate monitoring or capacity changes to prevent recurrence.
Disclaimer: The commands and procedures in this article are provided for educational and troubleshooting purposes. Test changes in a non-production environment before applying them to production systems. Always consider active applications, Oracle software requirements, filesystem configuration, backups, and your organization's change-management procedures before deleting files or changing storage configuration.
Comments
Post a Comment