Sticky Banner Visual Mobile 5

Lock in premium privacy for less: 2 years + 4 months at a special price.

Lock in 2 years + 4 months at a special price. Claim now!

Claim Now!
Sticky Banner Visual Mobile 3

Spring deal: Save up to 78% — Offer ends in

Spring Deal: Save up to 78%

Claim Now!
  • Understanding temporary files and their impact
  • How to delete temporary files on Windows 10 and 11
  • How to delete temporary files on Mac
  • Troubleshooting temporary file cleanup
  • Best practices for ongoing cleanup
  • FAQ: Common questions about deleting temporary files
  • Understanding temporary files and their impact
  • How to delete temporary files on Windows 10 and 11
  • How to delete temporary files on Mac
  • Troubleshooting temporary file cleanup
  • Best practices for ongoing cleanup
  • FAQ: Common questions about deleting temporary files

How to delete temporary files and free up space

Featured 23.04.2026 9 mins
Sayb Saad
Written by Sayb Saad
Ata Hakçıl
Reviewed by Ata Hakçıl
Amy Clark
Edited by Amy Clark
how-to-delete-temporary-files

Temporary files accumulate from applications, browsers, system updates, and the operating system itself. While most are intended to be short-lived, many persist unnecessarily, consuming storage space.

This guide explains temporary files, highlights which ones are safe to remove, and provides step-by-step instructions for clearing them on Windows and macOS. We also cover troubleshooting and best practices for ongoing maintenance.

Understanding temporary files and their impact

Temporary files are stored in dedicated system and application directories to avoid cluttering your main folders or documents. Common file locations include:

OS Location Scope Description
Windows %TEMP% User-specific User and application temporary files. Typically located at C:\Users\YourName\AppData\Local\Temp
Windows C:\Windows\Temp System-wide Windows and system process temporary files
macOS /tmp System-wide Short-lived temporary files; periodically cleared on reboot or by system maintenance
macOS ~/Library/Caches User-specific Application caches; generally safe to delete, as apps regenerate required data
macOS /private/var/tmp System-wide Longer-lived temporary files; cleared less frequently

Operating systems prioritize performance, so cleanup may be delayed to avoid disrupting active processes or to retain reusable cached data. As a result, files can accumulate after crashes, improper shutdowns, or inadequate app cleanup.

Some folders, especially on Windows, also aren’t automatically cleared on reboot.

Types of temporary files

Temporary files are generated for different purposes during normal system and application activity; the categories below group them by function and behavior:

  • Application temporary files: Short-term scratch data created during use (e.g., Office auto-recovery drafts).
  • Cache files: Re-creatable data stored to improve performance (e.g., browser page thumbnails and locally saved web content).
  • Browser temporary files: A subset of cache files holding web elements to help pages load faster on repeat visits (e.g., images).
  • Update and delivery cache files: Downloaded installers, update packages, or patches. These often reside in Windows Update folders rather than general temp directories.
  • Thumbnail cache files: Pre-generated previews of images, videos, and documents.
  • Recovery and unsaved document files: Temporary versions created automatically (e.g., Office .asd files) to help recover work after interruptions.

Cache files vs. temporary files

Cache files and temporary files often overlap, but they differ in purpose, lifespan, and management.

Cache files Temporary files
Purpose Store reusable data for faster repeated access Support a single task or process
Lifespan Can persist long-term until cleared or expired Often short-lived; typically deleted after the task ends
Persistence Often remains across sessions May linger if cleanup fails (e.g., crash)
System handling Auto-refreshed, pruned, or validated Often auto-deleted; may persist if cleanup fails
Deletion impact Rebuilds automatically when needed Safe once the process has finished

Why delete temporary files?

Deleting temporary files frees up disk space and maintains system efficiency. These files typically offer limited benefit once their associated tasks end.

Beyond this, clearing these files keeps folders organized, making manual inspection and troubleshooting easier.

Clearing unnecessary files also helps ensure only meaningful data is preserved, improving backups and system snapshots.

What not to delete

Not everything in temporary directories should be removed. For example:

  • Files in use: Actively used files may fail to delete or cause unexpected behavior. Close relevant programs (or restart your computer) before cleanup; the system will usually warn about active files.
  • Previous Windows installations: Older Windows versions may be included in cleanup tools and are required for system rollback. Only remove them if you no longer need the option to revert.
  • Downloads folder: Saved installers, documents, and media are often stored here. Review contents carefully before deleting, rather than removing in bulk.
  • System-critical files: Files outside standard temp and cache directories may be required for system operation. Using built-in tools like Disk Cleanup (Windows) or Storage Management (macOS) helps avoid removing essential data.

How to delete temporary files on Windows 10 and 11

There are several methods for clearing temporary files on a Windows device.

Using the temporary files menu

This method uses the built-in Storage section in Windows Settings. It lets you manually review and remove temporary files.

  1. Click Start and open Settings.Windows settings searched in the search bar.
  2. Go to System and select Storage.Storage settings on Windows.
  3. Click Temporary files. Windows will scan and display file categories.Windows temporary files and where to find them in storage settings.
  4. Check the boxes for the file types you want to remove and select Remove files.List of the types of temporary files on Windows.

Using Storage Sense

Storage Sense automatically removes temporary files and other unnecessary data from your system drive. You can turn it on to run automatically or run it manually at any time.

  1. Click Start and open Settings.
  2. Go to System and click Storage. Turn Storage Sense on.How to enable Storage Sense on Windows.
  3. Select Storage Sense to configure how and when it runs.
  • Choose cleanup options based on your needs, and then select Run Storage Sense now to clean immediately.Storage Sense configuration options on Windows.

Using Disk Cleanup

Disk Cleanup is a built-in Windows utility that removes unnecessary files, including temporary files.

  1. Type Disk Cleanup in the Start menu search box and open the app.Searching for the Disk Cleanup tool through Windows search bar.
  2. Select the drive you want to clean (usually C:) and click OK.Disk cleanup drive selection.
  3. In the list of files to delete, check the boxes next to the file types you want removed. Click OK.List of files to delete using Windows' Disk Cleanup tool.
  4. Now select Delete Files to confirm.Confirmation prompt to delete temporary files using Disk Cleanup.

Using the command prompt

Caution: Files deleted this way cannot be recovered. It’s also worth noting that some files may be skipped if they’re in use.
  1. Press Start and type Command Prompt. Click Run as administrator.How to run the command prompt on Windows as the administrator.
  2. To delete temporary files for the current user only, type del /q /f /s %TEMP%\* and press Enter.
  • If you want to delete temporary files system-wide, enter del /q /f /s C:\Windows\Temp\* instead.How to delete temporary files using the Windows command prompt.

Delete temporary browser data

Temporary browser data includes cached files and cookies stored to help pages load faster. Clearing the cache removes stored web resources, while clearing cookies and history removes login sessions and browsing records.

This guide uses Chrome as an example; you can find the cache and cookie management options in similar places in most other browsers.

  1. Open Google Chrome and click the three-dot menu in the top right. Click Settings.Google Chrome's settings button.
  2. Click Privacy and Security and Delete browsing data.Google Chrome's Delete browsing data option under Privacy and Security settings.
  3. Choose a time range, select Cached images and files and any other data types you want to remove, and then click Delete data.
  • Note that selecting “Cookies and other site data” signs you out of most websites.How to delete cached files and cookies on Google Chrome.

How to delete temporary files on Mac

As with Windows, you have several options on macOS devices.

Using Finder

  1. Open Finder and click Go in the menu bar.
  2. Hold the Option key, and click Library when it appears in the menu.
  • Open the Caches subfolder.
  • Select the files you want to remove, and drag them to the Trash.
Important note: While it’s generally safe to delete files in the ~/Library/Caches folder, avoid deleting files in /System/Library/Caches, as this may affect system stability.

How to go into Libraries from Finder on Mac.You can also open specific locations directly. Here’s how:

  1. Open Finder and click Go in the menu bar, select Go to Folder…, and enter a folder path such as ~/Library/Caches.Go to Folder option on Finder on Mac.

Clear temporary Safari data

On macOS, Safari has three cleanup controls, each removing different types of temporary browser data.

Empty cache

This method removes cached web resources, such as images, scripts, and page assets.

  1. Click Safari in the menu bar, then Settings, and navigate to the Advanced tab.
  • Toggle Show features for developers on to add the Develop menu to the menu bar.How to enable the developer tab in Safari.
  1. Click Develop and then select Empty Caches.How to empty the cache in Safari browser.

Manage website data

This process removes cookies, local storage, website databases, and some cached site data associated with those websites.

  1. Open Safari, click Settings in the menu bar, and go to the Privacy tab. Click Manage Website Data…Manage Website Data setting in Safari.
  2. The window that opens shows the website data that Safari has stored.
  • Select the specific website data you want to remove by clicking it individually, or click Remove All to delete everything.
  • Click Remove Now.Removing website data and cache in Safari.

Restart and empty Trash

Restarting your Mac can help clear temporary system files left behind by apps or processes. Afterward, you can permanently delete files from the Trash.

  1. Click the Apple menu in the top-left corner of the screen and click Restart.Restart button on a Mac.
  2. Once your Mac restarts, open Finder and click Trash.
  • Click Finder in the menu bar and select Empty Trash. You won’t be able to recover the files.How to empty the Trash folder on Mac.

Troubleshooting temporary file cleanup

If files won’t delete or space doesn’t free up after cleanup, the checks below can help resolve the issue:

  • Close related applications: Files in use by browsers, editors, or other utilities may not be deleted. Close relevant applications, wait briefly, then retry.
  • Check and elevate permissions: Some temporary folders or files require administrator rights. Run the tool or Command Prompt as administrator if needed.
  • Restart your computer: File locks held by background services or system processes may persist after apps are closed. Restarting releases these locks.
  • Wait for storage indicators to update: Storage summaries may take time to reflect changes after deletion. Refresh or restart if this doesn’t update immediately.

Best practices for ongoing cleanup

Temporary files inevitably reaccumulate from app usage, browsing, updates, and system activity. The points below help reduce buildup and limit unnecessary storage use:

  • Storage monitoring: Identify growing caches and temporary files early by using built-in tools (e.g., Settings > Storage on Windows, About This Mac > Storage on macOS).
  • Unused applications: Installed software may continue to generate and store temporary files even when not in use. Removing unneeded applications reduces unnecessary storage use.
  • Operating system updates: System updates often improve cache management and cleanup behavior, helping reduce the buildup of temporary files over time.
  • Download and installer remnants: Installers, setup files, and downloads may remain after use, unnecessarily taking up space. Reviewing and removing unneeded items helps reduce clutter.
  • System-managed locations: Some temporary and cache directories are managed by the operating system. Removing unfamiliar items may cause instability or unnecessary data regeneration.

FAQ: Common questions about deleting temporary files

How do I clear out my temporary files?

On Windows, open Settings > System > Storage. Select Temporary files, choose the items to remove, and click Remove files. You can also use Storage Sense to automatically clear them.

On macOS, open Finder, select Go > Go to Folder…, and enter ~/Library/Caches. Delete the files you no longer need, then empty the Trash.

You can also clear browser cache in Safari via Develop > Empty Caches.

Where are my temp files located?

On Windows, temporary files are typically stored in %TEMP% and C:\Windows\Temp. On macOS, temporary data is commonly stored in directories such as /tmp, ~/Library/Caches, or /private/var/tmp.

Is it safe to delete temp files?

Temporary files are typically safe to delete. However, there are certain files and folders that shouldn’t be removed. This includes any in use by an application and unrecognized or system-critical files.

Can deleting temporary files help my computer run faster?

Low disk space can reduce system performance, so freeing space may help the system run more smoothly. However, some cache data exists to improve performance, so removing it doesn’t always make apps faster.

What happens to programs when I delete temp files?

Programs usually continue working normally. Temporary files contain short-term data created during use, and once no longer needed, they’re safe to remove.

Most applications automatically recreate any required files the next time they’re launched. The main risks are deleting files while a program is actively using them or deleting critical files.

How often should I clear temporary files to maintain system health?

Cleanup is best done periodically based on need, such as when storage usage increases or performance declines. Windows may benefit from more frequent checks due to accumulated update files and logs, while macOS often requires less manual cleanup because it manages more temporary data automatically.

Does deleting temporary files delete everything?

No, it only removes selected temporary data. Cleanup tools target specific categories, such as temporary files or browser data, rather than all files on the system.

Take the first step to protect yourself online. Try ExpressVPN risk-free.

Get ExpressVPN
Content Promo ExpressVPN for Teams
Sayb Saad

Sayb Saad

Sayb Saad is a writer for the ExpressVPN Blog, where he covers online privacy, cybersecurity tools, and VPNs in particular. With over 5 years of experience under his belt, he's passionate about testing privacy tools hands-on and helping people make informed decisions about their online security and privacy. When he's not at his work desk, you'll find him spending time with his furry feline friend or spending time in nature to unwind.

ExpressVPN is proudly supporting

Get Started