Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Someone from Microsoft told me today that you can always shrink down a partition to the most it can (Update: by using the Win7 or Vista disk management tool) -- for example, when there are 120GB of free space on C:, then you can for sure shrink it by 120GB. Is that true? My experience is that you cannot. Maybe the way he used his computer, he told me he could always shrink down whatever that's available.

(for example, if he never made the partition full and then delete many files from it to gain back lots of space.)

Update: my experience had been this -- if you fill a 250GB hard drive to 100% full, and then delete many big files from it to gain back 80GB, then often you cannot shrink the partition by 80GB. You can maybe shrink it by 20GB, because it needs to shrink using contiguous free space. (by the Win7 or Vista disk management tool)

share|improve this question
(Please accept some answer if your question is answered; likewise for the 19 other questions you asked in the past 3 days...) – Arjan Oct 24 '09 at 13:44
Actually, this question was already answered by @harrymc in your earlier question as well,… ...? – Arjan Oct 24 '09 at 15:54
I was able to to reduce the size of my partition to just over the size of the data using free tools: MyDefrag - Consolidate Space and then Defraggler - Defrag Freespace to move the remaining files at the end of it. Usually I'd use gparted without question, but in this case I couldn't. – Umber Ferrule Jan 24 '14 at 11:56
up vote 8 down vote accepted

No, this is incorrect : You can only shrink a partition until some file at the end of the partition blocks you.

For example, if a file occupies sector number x, then you can only shrink the partition down to x sectors, no matter even if all the sectors below x are free.

You can use defragmentation software to move some of the files allocated at the end toward the begining of the partition.

However, if the partition in question is the system, Windows has unmovable system files that it likes to allocate at the end of the partition. Such files will block any attempt to shrink the partition, so that the only way left to shrink will be to reinstall Windows.

For example, here is the analyze of my disk C by Smart Defrag.
The black rectangles denote unmovable system files:


share|improve this answer
Aha, at the end of the partition, I didn't know that. Any idea why? – Arjan Oct 24 '09 at 10:00
@Arjan: No idea why. Maybe the brilliant idea was to keep them out of the way. Sometimes they're allocated toward the end, sometimes around the middle, I don't know of a way to predict where they end up. The pagetable can be turned off for defragmenting and shrinking, but it's the only one. – harrymc Oct 24 '09 at 10:26
so if it is Partition Magic, GParted, or Ubuntu installation disc, can all shrink better? In other words, those can shrink it down to the most possible. Win7 or Vista's tool won't. – 太極者無極而生 Oct 24 '09 at 11:59
The following is not about Windows, but a quote from Apple: There is also a chance that one of the files placed in the "hot band" for rapid reads during system startup might be moved during defragmentation, which would decrease performance. -- Having said that, back to Windows: if Windows considers some files to be immovable, then I'd not trust third-party tools to know better than Microsoft itself... (Just a feeling, I am not using Windows.) – Arjan Oct 24 '09 at 13:52
@Jian Lin: No, all the tools will do the same thing. If Win7/Vista cannot do it, no other tool can do better. Turn off the pagefile, use a good defragmenter such as tha will consolidate free space, then try shrinking again using Win7/Vista. If that's not enough, then the only solution is to delete the partition and reinstall Windows to a smaller partition. – harrymc Oct 24 '09 at 16:17

If you boot under safe mode and disable the page file you can shrink the partition a lot after first moving all files together with a tool like MyDefrag. Another solution is to use another computer if you want to shrink the partition even more.

When using Mydefrag, use the Consolidate Free Space script:

Move all the files to the beginning of the disk on all the fixed, mounted, writable volumes on the computer. This can sometimes be useful on very full volumes, to make room for manouvering big files. The script will defragment all fragmented files and will fill all the gaps. It does not do any optimization, such as sorting the files into zones.

Besides that you might want to look into the other scripts too, sorting your disk offers greater benefits than just doing a defragment. Check out the site for more information...

share|improve this answer
my current thinking is, if a tool can compact all the files together, that's good already. in terms of defrag, it could take a long time for the content (like my hard drive is 700GB total). I just want 60GB to install Win7 64 bit to start using it. – 太極者無極而生 Oct 24 '09 at 13:03
also because nowadays, fragmentation doesn't seem so big a problem. in the old days, fragmentation seems like slowing down the computer a bit. nowadays it feels like it is fast even with fragmentation. – 太極者無極而生 Oct 24 '09 at 13:04
@Jian, Vista is running defrag in the background, for what I've heard: see "Is defragging relevant to improving disk performance anymore?" at… (I'd be careful to use third-party tools to move "immovable" system files to another location, if your only goal is to test run Windows 7. If there's a chance you'll stick at Vista, then I'd not mess with that disk.) – Arjan Oct 24 '09 at 13:43
Why wouldn't you want to run this script? It has at least two benefits to you: It doesn't only consolidate the free space, it also defragments it at the same time. If your hard drive is that big then it means that occasionally your disk head has to move forth and back across that 700GB to read a part of a file! And don't forget that the process of consolidating free space isn't as lengthy as sorting your whole disk... Please note that you can also zoom in and hover the files that are stuck at the end of your disk. Maybe you don't need these files and can delete them right away... – Tom Wijsman Oct 24 '09 at 22:51
Defragmenting and Sorting still mathers nowaday, compare a heavily fragmented 1TB database server to a defragmented andn sorted 1TB database server. Reading a database folder in place differs in time than having to move forth and back over the disk... Unless you are using an SSD, but then this topic wouldn't have existed. However, this is way off-topic. Your goal is still to shrink the partition, I would consider this method to be the safest with an extra benefit of defragmenting and having everything consolidated. If you want a less safe method you could use GParted, it worked for me yrs ago. – Tom Wijsman Oct 24 '09 at 22:58

You can, but you probably wouldn't be able to boot. There are temp files created at startup, you'd get disk write errors because of insufficient space.

share|improve this answer
sorry i meant by using Win7 or Vista disk management tool – 太極者無極而生 Oct 24 '09 at 3:45
You should also specify next time that the free space is only a result of deleting the files. Just saying "Free space" leads me to assume it was contiguous to begin with. – John T Oct 24 '09 at 3:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .