How to delete temp files on a laptop: Windows 11 and Mac, safely

On Windows 11 use Settings > System > Storage > Temporary files or Storage Sense; on a Mac use the Storage recommendations and let macOS clear caches.

Read time
11 min
Word count
1.7K
Sections
10
FAQs
8
Share
Windows and Mac laptops on a desk beside a checklist, with the title Delete temp files safely and Windows and Apple logos
On this page · 10 sections
  1. Temp file clean-up methods at a glance
  2. Method 1: Temporary files in Settings (Windows 11)
  3. Method 2: Turn on Storage Sense (automatic clean-up)
  4. Method 3: Clear the %temp% folder by hand
  5. Method 4: Disk Cleanup (cleanmgr) still works
  6. How to clear temp files and cache on a Mac (macOS 27)
  7. What not to delete
  8. For IT teams: manage Storage Sense with Intune or Group Policy
  9. How eCorpIT can help
  10. References

Summary. On a Windows 11 laptop, open Settings > System > Storage > Temporary files, tick the categories you want gone and select Remove files. For a manual clean, press Windows + R, type %temp% and delete files older than about a week, which Microsoft's Disk Cleanup reference says is safe. Storage Sense automates the job: it is off by default, works only on the system drive, and leaves Downloads and OneDrive alone unless you change that. Its default Recycle Bin threshold is 30 days. Disk Cleanup (cleanmgr) still runs on Windows 11 and is not on Microsoft's deprecated-features list, last updated on 6 November 2026, but the Windows 11 help now leads with Storage Sense and Cleanup recommendations. A Mac has no temp-file button: macOS clears caches and logs that are safe to delete when space is needed, so use the recommendations in System Settings > General > Storage and empty the Trash. Never delete the WinSxS folder by hand. Microsoft warns it can leave a PC unable to start or update.

About this article. For anyone running short of space on a Windows 11 or Mac laptop, and for IT teams that manage Storage Sense on company devices. We checked every step and setting name on 11 November 2026 against Microsoft Support and Microsoft Learn pages and Apple's Mac User Guide for macOS 27 Golden Gate. Microsoft's help gives one set of steps for all current Windows 11 releases, which on that date were versions 24H2, 25H2 and 26H2, plus 26H1 on some new devices only. Labels can differ slightly between builds. Back up anything important before a large clean-up. Researched with AI assistance and reviewed by our editorial team.

Temp file clean-up methods at a glance

This table summarises the built-in tools Microsoft and Apple document.

Method Where What it removes Risk
Temporary files Settings > System > Storage > Temporary files Categories you tick, such as temporary files, Recycle Bin, previous Windows installation Low if you read each tick box
Cleanup recommendations Settings > System > Storage > Cleanup recommendations Temporary files, large or unused files, files synced to the cloud, unused apps Low; review each list
Storage Sense Settings > System > Storage > Storage Sense Unused temporary files; Recycle Bin items after 30 days by default Low; automatic
%temp% folder Windows + R, then %temp% Your own apps' temporary files Low; skip files in use
Disk Cleanup Windows + R, then cleanmgr Temporary files, Recycle Bin, setup and update leftovers Medium for system-file options
Mac Storage settings System Settings > General > Storage Files moved to iCloud, watched Apple TV content, old Trash Low

Method 1: Temporary files in Settings (Windows 11)

  1. Select Start > Settings > System > Storage.
  1. Under the disk usage list, select Temporary files.
  1. Read each tick box. Untick anything you still need, such as the Recycle Bin or Downloads if either is listed.
  1. Select Remove files.

Previous Windows Installation(s) appears here after an upgrade. Removing it deletes the Windows.old folder, which you need to go back to your earlier version of Windows. Microsoft lists it as deletable when fewer than 10 days have passed since the upgrade, and the removal can't be undone.

The same Storage page has Cleanup recommendations. It groups temporary files, large or unused files, files synced to the cloud and unused apps, and shows how much space each would free. Review each section, then select Clean up under it.

Method 2: Turn on Storage Sense (automatic clean-up)

Storage Sense removes unneeded temporary files and old Recycle Bin items for you. Its settings apply only to your own account.

  1. Go to Start > Settings > System > Storage and set Storage Sense to On.
  1. Select Storage Sense, then choose how often it runs under Run Storage Sense.
  1. Set how long items can stay in the Recycle Bin before deletion and, if you want, how long Downloads files can go unopened before deletion.
  1. If you are signed in to OneDrive, choose when unopened cloud files become online-only. From Windows 11 version 22H2 the default is 30 days, and this never deletes the file from OneDrive. Files marked Always keep on this device are exempt.

Microsoft's Storage Sense page, updated on 3 November 2026, adds four points.

  • Storage Sense is off by default. If your disk runs low and you have never used it, Windows may switch it on to clear selected temporary files, then notify you.
  • It works only on the system drive, usually C:. For other drives, use Advanced storage settings > Storage used on other drives.
  • It can't run unless you have been signed in and online for more than 10 minutes.
  • You are in a low-disk state when the capacity bar on the Storage page turns red.

Method 3: Clear the %temp% folder by hand

%temp% opens the folder your TEMP environment variable points to: your personal Temp folder. Apps look for the TMP variable first, then TEMP.

  1. Restart the laptop, or close open apps, so fewer files are locked.
  1. Press Windows + R, type %temp% and press Enter.
  1. In File Explorer, select View > Details, then sort by Date modified.
  1. Select files and folders not modified for at least a week, the age Microsoft's Disk Cleanup reference treats as safe, and press Delete.
  1. If Windows says a file is in use, skip it. A running app still needs it.
  1. Empty the Recycle Bin to get the space back.

Do this only in your own Temp folder. Processes running as SYSTEM use C:\Windows\SystemTemp, which Microsoft locks so that ordinary processes can't reach it. Leave it to the Windows tools.

Method 4: Disk Cleanup (cleanmgr) still works

Its status on 11 November 2026:

  • It runs on Windows 11. Microsoft's cleanmgr command reference lists Windows 11 and Windows 10 among the supported systems.
  • It is not on Microsoft's list of deprecated features for the Windows client, last updated on 6 November 2026.
  • Microsoft's old Disk Cleanup help link now redirects to its Free up drive space in Windows page, where the Disk Cleanup steps sit under the Windows 10 tab.

To use it, press Windows + R, type cleanmgr, press Enter, pick drive C: and select OK. Tick the file types you want to delete; Downloaded Program Files, Temporary Internet Files and Thumbnails are ticked by default. For update and upgrade leftovers, select Clean up system files, pick the drive again and choose the system file types. Select OK, then Delete files. On a drive other than the Windows drive, only the Recycle Bin and Catalog Files for the Content Indexer options appear.

How to clear temp files and cache on a Mac (macOS 27)

macOS has no temporary-files control, and Apple never asks you to empty cache folders by hand. Instead:

  1. Choose Apple menu > System Settings, select General in the sidebar, then select Storage.
  1. Review the recommendations. Store in iCloud keeps Desktop and Documents files, photos and messages in iCloud. Optimize Storage removes Apple TV films and shows you have watched and keeps only recent email attachments when space is needed. Empty Trash automatically erases items that have been in the Trash for more than 30 days.
  1. Delete what you don't need from Downloads, uninstall unused apps and delete old iPhone or iPad backups. In Mail, choose Mailbox > Erase Junk Mail and Mailbox > Erase Deleted Items.
  1. Empty the Trash. The space isn't freed until you do.

Apple's macOS 27 user guide says that when space is needed, macOS also clears caches and logs that are safe to delete, including temporary database files, interrupted downloads, staged macOS and app updates, and Safari website data. If you need room for one task, such as installing a macOS update, Apple suggests starting up in safe mode, which clears certain system caches that macOS rebuilds as needed. Restart normally to leave safe mode. Our macOS 27 Golden Gate guide covers the rest of the release.

The System Data category in Storage covers Apple and third-party files that don't fit any other category. Browser caches are separate: for Chrome, see how to clear cache in Chrome.

What not to delete

  • WinSxS. Microsoft warns that deleting files from the WinSxS folder, or the whole folder, can damage Windows so badly that the PC won't start or take updates. Windows trims it automatically, and Disk Cleanup's update clean-up reduces it safely.
  • Windows.old, if you might roll back. Removing Previous Windows Installation(s) can't be undone.
  • Windows system folders. Leave C:\Windows and its subfolders to the Windows tools above.
  • Mac System and Library folders. Apple's documented steps never ask you to delete them.
  • Anything you haven't looked at. Downloads and the Recycle Bin can hold the only copy of a file.

Every step here uses built-in tools; none needs a third-party cleaner app.

For IT teams: manage Storage Sense with Intune or Group Policy

On managed fleets, Storage Sense is controlled through the Storage area of the Policy CSP (Pro, Enterprise, Education and IoT Enterprise, Windows 10 version 1903 and later), deployed with Intune or with Group Policy under Computer Configuration > System > Storage Sense. Defaults are from Microsoft's policy reference.

Policy What it does Default
AllowStorageSenseGlobal Enabled: on, and users can't turn it off. Disabled: off, and users can't turn it on Not configured: off until low disk
AllowStorageSenseTemporaryFilesCleanup Deletes users' temporary files that aren't in use 1 (allowed)
ConfigStorageSenseGlobalCadence 0 low disk, 1 daily, 7 weekly, 30 monthly 0
ConfigStorageSenseRecycleBinCleanupThreshold Days before Recycle Bin items are deleted (0 to 365) 30
ConfigStorageSenseDownloadsCleanupThreshold Days before unopened Downloads files are deleted (0 to 365) 0 (never)
ConfigStorageSenseCloudContentDehydrationThreshold Days before unopened cloud files go online-only (0 to 365) 0 (never)

Note the mismatch: Microsoft's consumer page says Windows 11 22H2 and later make OneDrive files online-only after 30 days unopened, while the policy reference lists 0 (never) for that setting. Set the value explicitly so devices behave predictably.

For scripted clean-ups, cleanmgr supports /sageset:n to save a profile (n can be 0 to 9999) and /sagerun:n to run it, for example from a scheduled task. /verylowdisk runs with default settings and no prompts.

Downloads folders also collect exported reports and attachments long after anyone needs them, so clean-up cadence is a data-hygiene question too. Our cybersecurity services team can help set endpoint retention to match your policies.

How eCorpIT can help

eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our digital transformation services team helps organisations standardise storage, update and clean-up settings across Windows and Mac laptop fleets. Talk to us at /contact-us/.

Last updated: 11 November 2026.

References

  1. Manage drive space with Storage Sense, updated 3 November 2026 — Microsoft Support
  1. cleanmgr — Microsoft Learn
  1. Storage Policy CSP — Microsoft Learn
  1. Deprecated features in the Windows client, updated 6 November 2026 — Microsoft Learn
  1. Free up drive space in Windows, updated 10 November 2026 — Microsoft Support
  1. Optimize storage space on your Mac, Mac User Guide for macOS 27 Golden Gate — Apple Support
  1. Clean up the WinSxS folder — Microsoft Learn
  1. Windows 11 release information — Microsoft Learn
  1. GetTempPath2W function — Microsoft Learn
  1. Disk cleanup in Windows (old link, now redirects to Free up drive space in Windows) — Microsoft Support
  1. Free up storage space on Mac, published 16 October 2026 — Apple Support

Frequently asked

Quick answers.

01 Is it safe to delete temp files on a laptop?
Yes, for files in your own Temp folder that no app is using. Microsoft's Disk Cleanup reference says temporary files not modified within the last week can be deleted safely. Prefer the Temporary files page in Settings, read each tick box, and skip files reported as in use.
02 What is the shortcut to open the temp folder?
Press Windows + R, type %temp% and press Enter. File Explorer opens your personal Temp folder, the one your TEMP environment variable points to. Sort by Date modified, delete items older than about a week, skip anything in use, then empty the Recycle Bin to recover the space.
03 Does Storage Sense delete my Downloads folder?
Not by default. Microsoft says Storage Sense leaves Downloads and OneDrive content alone unless you set it up to manage them. With default settings it removes unneeded temporary files and deletes Recycle Bin items after a set period, which Microsoft's policy reference puts at 30 days.
04 Has Disk Cleanup been removed from Windows 11?
No. On 11 November 2026, cleanmgr still runs on Windows 11, Microsoft's command reference lists Windows 11 as supported, and Disk Cleanup is not on the deprecated-features list. Microsoft's Windows 11 help now leads with Storage Sense and Cleanup recommendations, so expect those to remain the documented route.
05 How do I clear cache and temp files on a Mac?
Open System Settings, then General, then Storage, apply the recommendations, delete unneeded Downloads and empty the Trash. Apple says macOS 27 clears caches and logs that are safe to delete, such as interrupted downloads and staged updates, when space is needed. Starting up in safe mode clears certain system caches temporarily.
06 Why can't I delete some files in the Temp folder?
An app or Windows service still has them open. Close your apps or restart the laptop, then try again. Files still locked after a restart belong to something that runs at startup, so skip them. Storage Sense removes only temporary files that aren't in use.
07 Should I delete the Windows.old folder?
Only if you are sure you won't roll back. Microsoft lists your previous version of Windows as deletable when fewer than 10 days have passed since an upgrade, and removing it can't be undone. Wait until your apps and devices work on the new version first.
08 How often does Storage Sense run?
You choose. Under Run Storage Sense you can pick daily, weekly, monthly or during low free disk space, which is the default. It runs only after you have been signed in and online for more than 10 minutes, and it works only on the system drive, usually C:.

About the author

Manu Shukla

Founder & Director

Founder of eCorpIT. Hands-on engineer leading senior-only delivery for AI apps, custom software, and cloud systems for global clients.

Subscribe

One engineering note a week. No fluff, no spam.

Senior-architect playbooks on AI agents, mobile apps, cloud, security, data, and marketing — delivered every Wednesday.

Past the reading

Read enough. Let's build something.

A senior architect responds in 24 working hours with scope, indicative cost, and a timeline. NDA before any technical conversation.

Loading search…

Browse all guides