How to Clean Up /var/tmp on Linux
Remove unnecessary files from /var/tmp on Linux and reclaim disk space with Kudu.
By Kudu Team
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Meta description: Remove unnecessary files from /var/tmp on Linux and reclaim disk space with Kudu.
What Causes This?
The /var/tmp folder stores temporary files that programs want to keep between reboots. Over time, installers, package managers, scripts, browsers, and other apps can leave behind old temp files that are no longer needed. If cleanup does not happen automatically, these files build up and waste disk space. Large log fragments, cached downloads, and abandoned temp data are common causes.
Common Symptoms
- Your Linux system is low on disk space for no obvious reason
- The
/or/varpartition keeps filling up - You see very large or very old files inside
/var/tmp - Software updates or app installs fail because there is not enough free space
- The system feels slower during file operations
How to Fix It Manually
-
Check how much space
/var/tmpis using.- Open a terminal.
- Run:
sudo du -sh /var/tmp - If you want to see which files or folders are taking the most space, run:
sudo du -ah /var/tmp | sort -h | tail -20
-
Review the contents before deleting anything.
- List files with details:
sudo ls -lah /var/tmp - Look for old archives, installer leftovers, cache folders, or files from apps you no longer use.
- Avoid deleting files that belong to programs currently running.
- List files with details:
-
Remove old files safely.
- To delete files in
/var/tmpolder than 7 days, run:sudo find /var/tmp -type f -mtime +7 -delete - To remove empty folders left behind after cleanup, run:
sudo find /var/tmp -type d -empty -delete - If you want to inspect first instead of deleting immediately, replace
-deletewith:-print
- To delete files in
-
Delete specific large items manually if needed.
- If you found a large file or folder you know is safe to remove, delete it directly:
sudo rm -f /var/tmp/filename sudo rm -rf /var/tmp/foldername - Be careful with
rm -rf. Double-check the path before pressing Enter.
- If you found a large file or folder you know is safe to remove, delete it directly:
-
Recheck free disk space.
- Confirm the cleanup worked:
df -h sudo du -sh /var/tmp - If space is still low, check other common locations such as
/tmp,/var/cache, and large log files in/var/log.
- Confirm the cleanup worked:
-
Set up regular cleanup if this keeps happening.
- Many systems already manage temp files with
systemd-tmpfiles. - To see current temp file cleanup rules, run:
systemd-tmpfiles --cat-config - If
/var/tmpis not being cleaned often enough, adjust your distro’s temp file policy carefully or use a maintenance tool to automate safe cleanup.
- Many systems already manage temp files with
Fix It Automatically with Kudu
Kudu can scan your system for oversized temp folders, leftover cache files, and other junk that builds up over time, including data similar to what fills /var/tmp. Instead of checking directories by hand and guessing what is safe to remove, Kudu helps you reclaim space with a faster, simpler cleanup process.
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Related guides
How to Clean Up the Downloads Folder on Linux
Organize and remove old files from your Linux Downloads folder with Kudu to reclaim disk space.
How to Clean Up Flatpak Files on Linux
Remove unused Flatpak runtimes and cache files on Linux safely with Kudu.
How to Clean Up Large Journal Logs on Linux
If journal logs are taking too much space, Kudu can help clean them safely and reclaim disk storage.
How to Clean Up /tmp on Linux
Clear temporary files from /tmp on Linux and reclaim storage space using Kudu.