Comprehensive IT management for enterprise teams—priced per technician for predictable, scalable costs. Boost security, minimize downtime, and support employees anywhere.
IT issues resolved for every employee in under 2 minutes on average. Robin by Atera is the AI technician that technical incidents end to end on devices, servers, mainframes, and networks, with no technician in the loop.
Have you recently (or not that recently) updated new versions of Windows? Great, now’s the time to clear some space by deleting the temporary files and user profiles you no longer need. Why do this, you ask? Well, clearing temporary Windows Update files usually fixes most update errors.
These temporary files are used by the Windows Setup process when installing a major update — and unless you’re in the middle of a Windows installation, you don’t need them anywhere and are welcome to get rid of them once and for all!
This script deletes temporary files for Windows Update, all user profiles, as well as the system TEMP directory. The script will momentarily stop the Windows Update service until its temporary files have been deleted; and start the service again once completed.
It’s worth noting that clearing temporary Windows Update files usually fixes most update errors.
The Script:
Atera does not guarantee the integrity, availability, security, virus-free, safety, lawfulness, non-infringement, rights’ status, or functionality of the scripts. The use of the shared scripts is at your own risk. Scripts are provided “AS IS”. *
cd /D C:\Users
for /D %%a in (*.*) do DEL /F /S /Q "%%a\AppData\Local\Temp\*.*"
for /D %%a in (*.*) do FOR /D %%b IN ("%%a\AppData\Local\Temp\*.*") DO RMDIR /S /Q "%%b"
DEL /F /S /Q %windir%\TEMP
net stop wuauserv
DEL /F /S /Q %windir%\SoftwareDistribution
net start wuauserv
Script copied to clipboard
Technical Notes:
1. Some Windows Update errors may not be resolved by deleting the Software Distribution contents alone. It may be necessary to also delete catroot files or apply other fixes, such as running DISM or SFC.
2. We recommend running this script as an administrator or higher. Otherwise, it may not run successfully.
3. This script may experience long run times due to the wildcard recursive file search method used, a slow filesystem I/O, or long response wait times.
* Scripts are provided for your benefit. You understand and acknowledge that when downloading and/or copying and/or using the Scripts: (i) you may be exposed to Scripts from a variety of sources, (ii) Atera is not responsible and takes no liability for the accuracy, usefulness, integrity, lawfulness, title or infringement, security, functionality or Intellectual Property Rights of, or relating to, such Scripts; and (iii) the Scripts are provided “AS IS” and “AS AVAILABLE”, and may have errors, and may not be malware-free, and that your interactions with, and use of, the Scripts is at your sole risk and free will. You hereby agree to waive, and hereby do waive, any legal or equitable rights or remedies you may have against Atera with respect to the Scripts.