Web Programming, Linux System Administation, and Entrepreneurship in Athens Georgia

How to shrink a partition with unmovable files in Windows 7

For some reason Windows can’t figure out how to move some files around on disk. When attempting to shrink a volume, it will only allow you to shrink it to where the last immovable file is located. These are some things I found necessary to temporarily get rid of those immovable files so that an NTFS volume could be shrunk

1- Disable System Restore (Right click on Computer => Properties => System Protection => System Restore)
2- Disable Virtual Memory (Right click on Comptuer => Properties => Advanced System Settings => Performance (Settings) => Advanced Tab => Virtual Memory (Change) => No Paging File => Set.
3- Run Disk Cleanup to get rid of Thumbnails, Temporary Internet Files, and a bunch of other files that it makes no sense why they are immovable.
4- Restart the computer to have #1 and #2 take effect

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

It took me about 5 loops of doing the above before I was finally able to shrink my volume to the size that I wanted. After successful, you can then re-enable the features that you want (namely System Restore and Virtual Memory)

27 Comments

  1. Nate Carr

    Great tutorial!

  2. BigBig

    Thanks! Useful tips. Trying to clone 500GB system disk to a 250GB Intel510 SSD and needed to re-size partition, but the OS would only let me shrink to 283GB at first..

  3. Rob

    Thanks so much for this, it helped me loads, especially the event viewer part. I found I also had system restore and thumbnail files that couldn’t be moved, but using the event log I also found that I needed to disable cryptographic services and then rename/delete the catroot2 folder in system32, and also disable the search service and then delete the CiFiles that the indexer made.

    Until I had done all of those things, it had immovable files after 100gb of free space; afterwards there were none and I could make the partition as tiny as I liked.

  4. Nikhil

    Thanks. It worked for me. Before following your steps, I had only 5GB shrink-able but I turned off the system restore and (without restarting) I got 70GB free.

  5. huts

    Would it work with SBS2011 ???

  6. Nikhat

    that helpd me alot..really really great tutorial..!!

  7. Adam

    Another avenue to explore is stopping Cryptographic services. I encountered a problem with this particular file:
    Windows\System32\catroot2\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\catdb::$DATA

    and found a solution here:
    http://forums.whirlpool.net.au/archive/1906120

  8. Sarah

    Thank you so much,

    This tutorial helped me free up 16G of shrink space when before I was stopped at 0.6. I had to go through the logs to clear out a file, but fortunately only 1 iteration of that freed up the space I needed.

  9. Scoot

    Thanks! This worked for me too. I had to do a couple iterations of running the Shrink application and then checking the log to see why it balked. For me, with Win7(32), I had to disable windows search before it would release a few files.

  10. Hans Verlouw

    Thank you very much! I found these tips after I spent a whole day on this. The solution was to remove the paging file indeed.

  11. Roger

    Good tutorial, also valid for Windows 8.1
    After disabling restore points (it deletes all points created, yes, not a big problem on a fresh Windows installation), it enabled to shrink as much space as was available on my HD.

  12. matt

    AWESOME!! Worked just disabling restore and virtual memory (but I was starting with a brand new laptop). Before disable windows would only allow me to shrink 350Gb, after disable I was able to squeeze it 650Gb!!

    Thanks

  13. Lewis Balentine

    hiperfile.sys is another big one that will hang you up.
    open a cmd prompt as the Administrator
    powercfg -H OFF
    (note the case)
    reboot

  14. Nathan

    Also try disabling indexing service as this can generate a large windows.edb file which cannot be moved. It can also be deleted after disabling Indexing service

  15. JP

    My hair was graying (even more) over this problem until I found this tutorial… worked like a charm! Thx!!!

  16. Paul Trotter

    The above tips were really useful but still weren’t enough. I managed to find an application called PerfectDisk that has a free trial and used its defragging and prepare for shink function. That was what finally fixed it for me.

  17. Prabhu

    Buddy – It’s really helped me for my new laptop. Thanks so much.
    Rob’s post also helpful — Thanks Dude.

  18. John Liad

    i’m not able to delete the files in the event viewer. each time I clear log, the file comes back. please help

  19. TVL

    5 years after the article and still accurate !
    Thank you so much for helping with this problem

  20. Mike

    This worked for me. I found that a lot of the unmovable files were due to a program that was in use. Simply figuring out which program and closing it worked most of the time. For example, having Chrome open to look at this tutorial created some kind of temporary file that wouldn’t go away until I closed the browser. The same was true of a file that collects data about Antimalware – I had to disable Security Essentials for a minute or two so that this file didn’t get in the way. In both cases I didn’t have to delete anything, just close or disable the program that was accessing the files.

    Thanks for this tutorial!

  21. Ari Timonen

    Thanks for this.

  22. spearsg

    Oh heck yes, good job buddy. I’d like to emphasize for others, that I — as you — has to cycle thru the items multiple times, followed by multiple reboots to get success.

    I did not have to go into Event Viewer – but was my next option.

    Alas, the cycles were worth it. I can actually shrink the volume down to actual total file allocated bytes size. (I’m not going to go that low, cuz it would be a little stupid — but can now if I want to) Noice!!!

  23. paul

    thankyou

  24. Rick

    Thanks for the straightforward tutorial. This saved me a lot of time and heartache.

  25. Paul

    Great, been going around in circles till I found this. Took about six goes, but worked a treat!

  26. nadim

    Thank you very much!!! I had to delete the ProgramData/Microsoft/Diagnosis/events*.rbs as well in Safe mode.

    I am installing Linux Mint on my laptop.

  27. Winter

    Thanks buddy worked

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2024 Brandon Checketts

Theme by Anders NorenUp ↑