The longer a PC runs without a shutdown or a reboot, the more cluttered it will get with data and temporary files on Windows caches. Several cleaning programs promise to get the job done, but we usually have to need to run them manually or have them constantly consume system resources for the automation. Below we will see how we can clean Windows automatically, without the need of any third-party apps.
Especially since the recent CCleaner problems with malware, it's more important than ever to rely on Windows rather than third-party apps.
Table of Contents
The paging (or page) file is one of these controversial Windows subjects, and there is a lot of debate on whether we should reduce or increase its size, clean it regularly, and so on.
For those not familiar with the page file, let's just say that it is Windows' way to store data temporarily when it runs out of available RAM.
However, the operating system doesn't clear the page file by default when we turn off our computer. Thus, there may be some sensitive data left on the hard drive, and it might fall into the wrong hands.
If we worry about someone else stealing our data that way, we can tweak some settings and enable the option to clean Windows page file automatically.
Before we proceed, we should mention that with this method the computer will take much, much longer to shut down, depending on the paging file's size. This is the reason why Windows have this option disabled by default.
To change this setting, we have to "mess" with the registry. Press Windows key + R and type "regedit." Click OK to access the Windows registry.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Find "ClearPageFileAtShutdown" and change its value to 1.
As we mentioned above, this setting will increase the shutdown time. If we notice that our system takes too long to turn off, we can always revert the changes.
Clean Windows temporary files
Another folder on our drive that tends to grow big is the Temp folder. This folder stores temporary files of all kinds, such as images, logs, etc.
Several tools can clean Windows manually, but we can also create a file that automatically clears the temporary files on Windows login.
First, we need to open Notepad and type the following:
rd %temp% /s /q md %temp%
Now we have to click on "File > Save As" and give the following name:
Lastly, click on Save.[]
You don't need to set a location for the file since the above name will automatically place it in the startup folder.
From now on, the Temp folder will clean each time we open the computer. To reverse this, we can navigate to the above path and erase the "temp.bat" file.
Windows keeps a history of recently opened files on some of the installed programs. There is a big list of recent files if you right click on the explorer icon, for instance.
Once again, the registry can help us clean Windows on shutdown and remove all the recently opened documents from that list.
From the Registry Editor, we navigate to this path:
Then we right-click on Policies and select "New > Key."
From there, name the new key "Explorer." In this folder, right-click on the blank space and choose "New > DWORD (32-bit) Value."
Even if you have 64-bit Windows, you should use DWORD. The QWORD (64-bit) is not interchangeable and won't work.
Give this value the name "ClearRecentDocsOnExit" and press Enter.
Double-click on the new entry we just created and change the value to 1.
To reverse the changes, change the value back to 0.
Some of the live tiles in Start Menu display notifications and other information now and then. However, we don't always open the apps to read the notifications, and thus they might pile up.
To clean Windows notifications on live tiles, we have to edit another registry key.
This time we'll need to go to:
Now, right-click on the Windows folder and choose "New > Key" once again.
Type "Explorer" and press Enter.
After that, we open the new Explorer folder we just created and right-click on a blank space. This time we choose "New > DWORD (32bit) Value.
We name the value as "ClearTilesOnExit" and set it to 1. Our tweak is ready and we can reverse it by setting the value back to 0.
Our browser saves tons of files and data when we surf the net, such as history, cookies, forms, etc.
These files stay on the hard drive, not only when we close the browser, but also when we shut down the computer.
There is no universal way to erase the data on shutdown, but each browser has unique settings to clean these files when we close the browser.
On Google Chrome, we will find the option on "Settings > Advanced > Content Settings > Cookies."
Turn on the switch "Keep local data only until you quit your browser," and you are ready to go.
Now, when you exit Chrome, all stored cookies will be erased. Notice, however, that this setting won't clean Chrome's cache, only the cookies.
Also, deleting the cookies all the time will log us out of any accounts we are using (webmail, social media, etc.) and erase site-specific preferences.
We will also be seeing the European Union Cookie Law message all the freaking time, on every single site.
We can make the same adjustment to Firefox as well.
Head to "Menu > Options > Privacy" and change "Firefox will" to custom settings.
From there, click on "Clear history when Firefox closes." If you click on "Settings...", you can choose which data will be erased when you close Firefox
Microsoft's new browser is becoming more and more popular with Windows 10. Edge can purge its cache on exit as well, and we can set it from Settings.
All we have to do is choose the data we want to erase on the "Clear browsing data" section.
When we are finished, we slide the "Always clear this when I close the browser" switch to On.
How often do you clean Windows?
Do you use any third-party programs to clean your Windows distribution? Are you going to use any of the methods we suggest above?
Leave a comment below.
- Backup Program Settings for Windows Format or Transfer
- Play StarCraft in your Browser, with an Unofficial Port
- Delete Windows.old after the Windows 10 Fall Creators Update
- How to Change Default Browser in Windows 10
- Clean Windows 10 Install for Free: This is the Only Way
Do you want to support PCsteps, so we can post high quality articles throughout the week?
If you prefer your purchases from China, we are affiliated with the largest international e-shops: