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:

HOWTO: Repair Logitech M325 Mouse

FixIt says that you will find single screw under CE label. It isn't always true.