SoftwareDistribution folder is huge on small drive

Windows cleans SoftwareDistribution directory automatically after updates are installed.
The directory was 1GB big after updates on 20GB partition and the reason was \softwaredistribution\datastore\datastore.edb file.
Forums says just delete the whole folder. Don't do it!
datastore.edb is Extensible Storage Engine (ESE) database and you can shrink it.
Launch cmd.exe as as administrator and execute

net stop wuauserv
esentutl /d %windir%\softwaredistribution\datastore\datastore.edb
net start wuauserv

After defragmentation the file was reduced upto 10MB. Wow! I got free space on the disk.
Enjoy!

No comments:

Asterisk AST_SORCERY function

 AST_SORCERY gets a field from a sorcery object. Sorcery is always created for PJSIP aors, endpoints and identifies in asterisk. It allows y...