When your computer says “not enough space in temporary folder,” it means the drive where your temp files are stored is full or nearly full, and programs can’t write the temporary data they need to run. The fix is usually simple: clear out old temp files, free up space on the main drive, and move the temp folder if needed. Below is a complete guide to understanding and solving this error on Windows and macOS.
What Is the Temporary Folder?
The temporary folder (often C:\Users\ on Windows or /var/folders/... on macOS) is where the operating system and applications store short-lived files: installer fragments, auto-save data, cached thumbnails, and files being processed. These files are meant to be deleted after the task finishes, but programs crash, updates get interrupted, and files are left behind. Over time, the folder can accumulate gigabytes of junk.
Why Does the Error Appear?
The error appears when the volume that holds the temp folder runs out of free space. On most systems, the temp folder is on the same drive as the operating system (usually C:). If that drive has less than a few hundred megabytes free, Windows and many applications will refuse to write temp files, and you’ll see the error. Other causes include:
- Antivirus software quarantining temp files and not releasing the space.
- A single program (like a video editor or browser) creating huge temporary files.
- A corrupted user profile where the temp path points to a non-existent or full location.
- System restore points or hibernation files consuming the same drive space.
How to Clear the Temporary Folder Safely
Clearing temp files is safe because nothing in the temp folder is needed for the system to boot or for your personal documents. Follow these steps on Windows:
- Press Win + R, type
%temp%, and press Enter. This opens your user temp folder. - Select all files (Ctrl + A) and delete them. Some files may be in use; skip those by checking “do this for all current items” and clicking “Skip”.
- Empty the Recycle Bin to actually free the space.
- Also clear the system temp folder: run
cleanmgr(Disk Cleanup), select the drive, and check “Temporary files”.
On macOS, you can use Finder > Go > Go to Folder and type /tmp (or /var/tmp), then delete contents. However, macOS manages temp files automatically, so the error is less common.
Move the Temporary Folder to Another Drive
If your system drive is chronically full (e.g., a small SSD), you can relocate the temp folder to a drive with more free space. On Windows:
- Create a new folder, e.g.,
D:\Temp. - Go to Settings > System > About > Advanced system settings.
- Click Environment Variables.
- Under “User variables”, select TEMP and TMP, and change each to
D:\Temp. - Repeat for the system variables (requires admin) if you want all users to use the new location.
- Restart the computer.
On macOS, you can set the TMPDIR environment variable in your shell profile, but it’s rarely needed. Instead, free space on the startup disk.
Free Up Space on the System Drive
If moving the temp folder isn’t enough, you need to free space on the drive itself. Common culprits:
- Hibernation file (hiberfil.sys) – can be several GB. Disable hibernation with
powercfg /h offif you don’t use it. - System Restore points – adjust the max usage in System Protection.
- Windows Update cache – run Disk Cleanup and select “Windows Update Cleanup”.
- Large downloads – move them to an external drive or delete.
- Recycle Bin – empty it.
Common Mistakes and Misconceptions
One common mistake is deleting files while they are in use. If you try to delete a file that a program is using, Windows will say “file in use”. It’s safe to skip those. Another misconception is that the temp folder is the same as the browser cache. They are separate: browser cache is stored in a different location (e.g., %LOCALAPPDATA%\Google\Chrome\User Data\Default\Cache) and can also take up space, but clearing it won’t fix the temp folder error.
Also, some people think they need to delete the entire temp folder itself. You should only delete its contents, not the folder, because the system expects that path to exist.
Frequently Asked Questions
Is it safe to delete everything in the temp folder?
Yes, it’s safe to delete most files. The system will recreate any that are needed. If a file is in use, Windows will skip it. Deleting temp files won’t affect your documents, photos, or installed programs.
Why does the error keep coming back?
If the error returns quickly, something is filling the drive again. Check for large files in the temp folder, run Disk Cleanup, and consider moving the temp folder to a larger drive. Also check if a specific program is creating huge temp files.
Can I set the temp folder to RAM?
Yes, you can point TEMP to a RAM disk, but that’s not recommended for most users because RAM is volatile and limited. If you have plenty of RAM, you could use a tool to create a RAM disk, but the setup is complex and you’ll lose temp files on shutdown.
Does clearing temp files speed up my computer?
It can free up disk space, which may help if the drive was nearly full. However, clearing temp files rarely improves performance beyond that because temp files aren’t loaded at startup. The main benefit is freeing space.
What if I can’t delete a file because it’s in use?
Skip it. If you want to delete it, close the program that’s using it, or restart the computer and try again. You can also use the “Unlocker” tool, but it’s safer to just skip.
Is this error the same as “low disk space”?
Not exactly. “Low disk space” is a general warning that the drive is running out of space. The “not enough space in temporary folder” error specifically means the system can’t write temp files, which is often caused by low disk space but can also be due to permissions or a corrupted temp path.