keepcalculator

06 Numbers and Powers

Why Temporary Internet Files Won’t Delete & Safe Clearing

Card No. 06·4152 · Updated · Standard formula, shown below

Temporary internet files often refuse to delete because they are locked by an open browser process, a background service, or Windows itself, and clearing them safely requires closing those processes first and then using a built-in tool like Disk Cleanup or a browser’s own cache-clearing option. This article explains the specific causes of stuck files and the safest step-by-step methods to remove them without harming your system or losing important data.

What Are Temporary Internet Files?

Temporary internet files (also called the cache) are copies of web pages, images, scripts, and other media that your browser stores on your hard drive to speed up future visits. When you revisit a site, the browser checks the cache first and loads the local copy instead of downloading everything again. This reduces bandwidth usage and makes pages load faster. The files live in a dedicated folder—for example, %LocalAppData%\Microsoft\Windows\INetCache on Windows for Edge and Internet Explorer, or a profile subfolder for Chrome and Firefox. Over time, the cache can grow to hundreds of megabytes or even gigabytes, so cleaning it is a common maintenance task.

Why Won’t They Delete?

Files in the cache are often locked by the very programs that use them. The most common reason a temporary file won’t delete is that the browser or an associated background process still has the file open. Even after you close the browser window, helper processes like chrome.exe, msedge.exe, or firefox.exe may remain active in the background, holding file handles. Windows also locks files that are in use by system services, such as the Superfetch (SysMain) service or the Windows Search indexer, which may be scanning the cache folder. Additionally, the file may be marked as read-only, or you may lack the necessary permissions if the folder is protected by the system. Malware can also create stubborn files that resist deletion, though this is less common.

How to Clear Them Safely (Step-by-Step)

Follow these steps in order, testing after each one to see if the files are gone. You should never force-delete a locked file with third-party tools unless you have confirmed it is not a system file, as that can cause instability.

  1. Close all browser windows and check for background processes. Open Task Manager (Ctrl+Shift+Esc), look under “Processes” for your browser name, right-click each entry, and select “End task.” Also end any processes like “Google Chrome Installer” or “Microsoft Edge Update.”
  2. Use the browser’s built-in clear cache option. In Chrome, go to Settings > Privacy and security > Clear browsing data. In Edge, go to Settings > Privacy, search, and services > Choose what to clear. In Firefox, go to Settings > Privacy & Security > Cookies and Site Data > Clear Data. Select “Cached images and files” (and optionally cookies) and click Clear. This is the safest method because the browser handles its own locks.
  3. Run Disk Cleanup. Type “Disk Cleanup” in the Start menu, select your drive (usually C:), and click OK. Check “Temporary Internet Files” and “Temporary files,” then click OK and confirm. Disk Cleanup uses the system’s own file-deletion API and can remove files that are not locked.
  4. Use Storage Sense (Windows 10/11). Go to Settings > System > Storage > Temporary files, select the categories you want, and click “Remove files.” This is a modern alternative to Disk Cleanup.
  5. If files still remain, restart your computer. A reboot releases all file handles, and then you can try Disk Cleanup again. If the files are still there after a reboot, they may be corrupted or protected by the system.
  6. As a last resort, manually delete the folder contents. Open File Explorer, type %LocalAppData%\Microsoft\Windows\INetCache in the address bar, and press Enter. If you can see files, select them and press Shift+Delete. If you get a permission error, you may need to take ownership of the folder—but this is risky and generally unnecessary. Prefer the built-in tools.

Common Problems and Misconceptions

A frequent misconception is that deleting temporary files will speed up your computer dramatically. In reality, the cache is designed to speed things up, and clearing it only helps if the cache is corrupted or if you are running out of disk space. Another issue is that users sometimes try to delete files while the browser is still running, which fails silently—the browser simply re-creates the files. Also, some users confuse temporary internet files with cookies. Cookies are small text files that store login sessions and preferences; deleting them logs you out of websites. Temporary files are mostly media and scripts, so deleting them does not log you out. A third problem is that the “Temporary Internet Files” folder in Windows Explorer may appear empty even though it contains hidden files. You need to enable “Show hidden files and folders” in File Explorer options to see them.

Safe Alternatives and Best Practices

If you want to avoid the hassle of manual deletion, you can configure your browser to clear the cache automatically when it closes. In Chrome, you can use a command-line flag (though it’s not recommended for daily use), or you can use a browser extension that clears cache on exit. For Windows, you can schedule Disk Cleanup to run automatically using Task Scheduler, but this requires some technical know-how. A simpler approach is to use a lightweight cleaning tool that is well-reviewed, such as the built-in Storage Sense or the free version of CCleaner—but always download from the official site. Avoid using “shredder” tools or command-line del commands on the cache folder because they may bypass system protections and cause errors if a file is in use.

When You Should NOT Delete Temporary Files

There are a few situations where deleting temporary files is counterproductive. If you are offline and relying on the cache to view previously visited pages, clearing it will make those pages inaccessible. Also, if you have a slow internet connection, clearing the cache will make web browsing slower for a while until the cache is rebuilt. Additionally, some web applications store data in the cache that can be used for offline functionality (like Google Docs offline mode). If you rely on that, you should not clear the cache without re-enabling offline mode. Finally, never delete the entire INetCache folder itself—only its contents. The folder is a system directory that Windows expects to exist.

Frequently Asked Questions

Why do temporary files come back after I delete them?

They come back because your browser creates new cache files every time you visit a website. This is normal behavior. If you want to keep the cache empty, you need to disable caching in your browser’s developer tools (for testing) or use a private/incognito window, which does not write cache to disk.

Is it safe to delete temporary files while the browser is open?

No. The browser holds locks on the files it is currently using, so deletion will fail for those files. It may also cause the browser to behave erratically. Always close the browser completely before attempting to delete cache files manually.

Will deleting temporary files remove viruses?

Sometimes. Malware can hide in the cache, but it is not the primary location for viruses. If you suspect an infection, run a full antivirus scan with your security software. Deleting the cache alone is not a reliable way to remove malware.

How much space can I free up by clearing temporary files?

It varies widely. A typical browser cache is between 50 MB and 500 MB, but heavy users with many video streams or large web apps can have several gigabytes. Disk Cleanup will show you the exact size before you confirm the deletion.

What is the difference between “Temporary Internet Files” and “Temporary Files” in Disk Cleanup?

“Temporary Internet Files” are specifically the browser cache. “Temporary Files” are files created by Windows and other programs, such as setup files, error reports, and thumbnail caches. Both are safe to delete, but they serve different purposes.

Can I move the temporary files folder to another drive to save space?

Yes, you can change the location of the cache in your browser settings (e.g., Chrome’s “–disk-cache-dir” flag, or Firefox’s browser.cache.disk.parent_directory setting). However, this is an advanced tweak and may cause issues if not done correctly. It is not recommended for average users.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →