If you’re not ready to perform a bulk delete action using the Disk Cleanup tool in Windows 11, you can delete the junk files from the Temp folder on your PC. You can just hit the Delete key on your keyboard after selecting the files. Press the Ctrl A shortcut to select all the files and folders, then right-click on them and select the Delete option (the bin icon).The action will open a File Manager app containing the Temp folder on your PC.Press the Windows R to start the Run app, type %tmp%, and press Enter or click OK.However, if you follow the steps above, you can configure it to start within desired time intervals so that you don’t need to do that manually again. If you don’t set it up, it will only be triggered when your disk space is low. Storage Sense is the automatic cleaning option that you can also find in Windows 10. You can choose from three settings: daily, weekly or monthly. Select the right option for you to act automatically.You can change that by clicking on the Run Storage Sense menu. By default, the feature will start to clean up unnecessary files in a low disk space situation. If you click on the Storage Sense option further, you can configure it.Now toggle the Storage Sense button to On.Access the System option from the right and select Storage.Click the Windows button and select Settings.It will start the Disk Cleanup utility with a minimum of options checked, but you can click the boxes you want from the menu. If you want to choose which files to clean, use this Disk Cleanup command, and then press Enter to run it: cleanmgr /sageset:1 You can also use the following command to clean up your disk, but it will erase less data than with the command provided in our steps above: cleanmgr /LOWDISK After the command has run, you will receive a report of how much space you’ve managed to free up.Type the following line and press Enter to run it: cleanmgr /VERYLOWDISK.Press the Windows R shortcut on your keyboard to start Run. From there, you can select which files you want to keep and which to delete. The easiest way to access it is via Drive Properties, a built-in menu on your PC. Select the data you want to delete by clicking the corresponding boxes, then on OK.įor a complete cleaning of your computer, you should use the Disk Cleanup feature. In the General tab, click on Disk Cleanup to start the app.ĥ. Now right-click the C: drive and select Properties from the drop-down menu.Ĥ. Press the Windows key E keys combination to start File Manager.ģ. If (Test-Path $env:SystemRoot\Logs\CBS\DeepClean.Home › Windows 11 › How To › Run Disk Cleanupġ. Get-Process -Name cleanmgr,dismhost -ErrorAction Silentl圜ontinue | Wait-Process Second wait neccesary as CleanMgr.exe spins off separate processes.' Write-Host 'Waiting for CleanMgr and DismHost processes. Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' -WindowStyle Hidden -Wait New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files' -Name StateFlags0001 -Value 2 -PropertyType DWord Write-Host 'Enabling Temporary Files Cleanup.' New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Update Cleanup' -Name StateFlags0001 -Value 2 -PropertyType DWord This is done automatically in Windows 10 via a scheduled task.' Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' -Name StateFlags0001 -ErrorAction Silentl圜ontinue | Remove-ItemProperty -Name StateFlags0001 -ErrorAction Silentl圜ontinue Write-Host 'Clearing CleanMgr.exe automation settings.' However, at some point CleanMgr spawns new processes which are visible and must be waited on separately. You will find the Registry key names in the "VolumeCaches" branch.Īs far as being silent, this script attempts to start CleanMgr.exe in a hidden window. To automate other extensions, create a "StateFlags0001" property in the corresponding Registry key, as done in the New-ItemProperty lines. In this case, it removes temporary files and runs the Update Cleanup extension to purge superseded Service Pack Backup files (Windows 10 now does this automatically via a scheduled task). The following Powershell script automates CleanMgr.exe.
0 Comments
Leave a Reply. |