Shrinking a partition in Windows is not something one does often, but when it comes to creating a disk image for a new SSD, or splitting a drive's space into multiple sections, you'll probably need to do some resizing beforehand. Unfortunately, Windows doesn't always play nice when you fire up Disk Management and hit the "Shrink" option — despite having a load of free space, you'll often find a significant discrepancy in the area you can reclaim.
When shrinking a volume, Disk Management doesn't provide much in the way of information when it declares that "unmoveable" data is preventing the drive from being reduced further. Fortunately, not only can you find out exactly which files it's complaining about, you might not even have to get down to that level, if you're willing to turn off a few of Windows' features temporarily.
As Brandon Checketts explains, it is possible to "move" those unmoveable files, but you can potentially avoid this step by trying the following first:
- Disabling System Restore and deleting all restore points
- Disabling virtual memory on the partition in question
- Using Windows' own Disk Cleanup tool
Obviously the first two shouldn't be done permanently, just for the time required to perform the shrink operation. If these fail however, you can hit up the Event Viewer:
Try to shrink the volume again. If it still is unreasonably large, you will then have to look at Event Viewer to find which file is at the boundary. 1- Right click on Computer => Manage => Event Viewer => Windows Logs => Application. 2- Click on Filter Current Log, and put ’259′ for the Event ID 3- Click on the latest event and look through the detail to find the problematic file. You can then attempt to delete that file (or set of files) manually. You may have to restart into safe mode to delete some files
I was recently in this position and had to check the logs to find which file was responsible — turns out it was a single temporary file in the AppData path. Once removed, I was able to shrink the system partition down to the precise amount of used space, give or take a few hundred megabytes.
How to shrink a partition with unmovable files in Windows 7 [Brandon Checketts]