Came across with many computer in domain with less then few GB space left on the local drive. This was concerning cause we have allocated enough drive space for the OS and program files. I needed to know what is taking so much space?
So I used an open source tool called WinDirStat, it doesn’t just calculate the folder size but also gives you a very nice GUI to evaluate which filetypes are taking most amount of space. So I scanned on of those computers by selecting A Folder in WinDirStat and \\computername\c$
Well, I found that 88% of space on the local drive was taken by .msp files, my first thought was – lets just delete these files. It is safe but I wont be able to uninstall any programs on that computer. So I chose a safer direction to solve the issue. I recently posted about uninstalling software on remote computers where MsiZap was used to remotely remove a software, this will work even if you are unable to remove the software from Add/Remove programs. MsiZap also provides you the ability to remove unused or extra installer patches on a computer with following command.
G – For All users, removes any orphaned cached installer data files.
! – Forces a “Yes” for any response prompts.
So again to automate this process a batch file can be created to run the following command on many computers remotely using PSexec.
psexec –cd \\computername “path\msizap.exe” G!
I was surprised to see that it deleted most of the .msp files and it created a lot of space. Might come handy for some of you out there.