Sign in to follow this  
6_6_6

DELETING 1.1 GB from WINDOWS folder: Howto

Recommended Posts

Okay, a friend of mine installed Vista on his SSD and was shocked to see that his 16GB drive was almost full after a week of usage.

Do we really need 140 mb Pinyin/Mandarin character recognition libraries? Or 110 mb of some weird named Butang Bulang Gulim Che Feng Shui Ming Lui fonts?

I think not!

On my 2008 server, I always delete the following and open up about 1.1 GB of space (20 files, but they are backup up all over):

#handwriting recognition dictionaries

mshwkorr.dll

mshwjpnr.dll

MSHWCHTR.dll

PINTLGT.IMD

IMTCS.IMD

IMJPST.DIC

IMJPNM.DIC

IMJPZP.DIC

#weird named fonts

mingliub.ttc

mingliu.ttc

batang.ttc

simsunb.ttf

msyh.ttf

msjh.ttf

msyhbd.ttf

simsun.ttc

gulim.ttc

msmincho.ttc

malgunbd.ttf

malgun.ttf

meiryo.ttc

meiryob.ttc

msgothic.ttc

simkai.ttf

simfang.ttf

simhei.ttf

kaiu.ttf

I never had a problem by deleting these and i am using 2008 server for a long time already.

Now, here is the tricky bit. It is almost next to impossible to delete these on your own. Need to set proper permissions, take ownerships, etc. And it is a pain in the ass.

Here is step by step how to do it:

1. Download and install Active Perl. Use all default options.

32-bit: http://downloads.activestate.com/ActivePer...-x86-285500.msi

64-bit: http://downloads.activestate.com/ActivePer...-x64-285500.msi

After installation, open a COMMAND PROMPT and type:

perl -V <enter>

If some data is scrolling down your screen, then it is working fine.

2. Create a text file in the root of your drive: files_to_delete.txt

Put inside the following text and save:

#handwriting recognition dictionaries
mshwkorr.dll
mshwjpnr.dll
MSHWCHTR.dll
PINTLGT.IMD
IMTCS.IMD
IMJPST.DIC
IMJPNM.DIC
IMJPZP.DIC

#weird named fonts
mingliub.ttc
mingliu.ttc
batang.ttc
simsunb.ttf
msyh.ttf
msjh.ttf
msyhbd.ttf
simsun.ttc
gulim.ttc
msmincho.ttc
malgunbd.ttf
malgun.ttf
meiryo.ttc
meiryob.ttc
msgothic.ttc
simkai.ttf
simfang.ttf
simhei.ttf
kaiu.ttf
#END#

3. Create a text file in the root of your drive: delete_crap.txt

Put inside the following text and save:

open(IN,"files_to_delete.txt");

system("dir /s /b > temp_filelist.txt");

open(REMOVED,">REMOVED_files.txt");
open(FAILED,">FAILED_files.txt");

open(OUT,">file_paths.txt");

while ($file=<IN>) {
$found = '';
next if $file =~ /^#/;
next if $file =~ /^\s+$/;
next if $file !~ /\S{5,}/;
chomp $file;

open(LIST,"temp_filelist.txt");
	while ($list=<LIST>) {
		chomp $list;
		if ($list =~ /$file/) {
			print OUT "$list\n";
			$found = 1;
		}
	}
close(LIST);

if ($found) { print "FOUND: $file\n";} else { print "NOT FOUND: $file\n"; }
}

close OUT; close IN;

open(IN,"file_paths.txt");

while ($file=<IN>) {
$found = '';
next if $file =~ /^#/;
next if $file =~ /^\s+$/;
next if $file !~ /\S{5,}/;
chomp $file;

if ($size = -s "$file") { 
	system "takeown \/f \"$file\"";
	system "icacls \"$file\" \/grant administrators:F \/t \/q";

	if (unlink("$file")) { 
		print "$file removed\n";
		print REMOVED "$file\n";
		$totalsize += $size; 

		} else { 

			print "$file COULD NOT BE REMOVED\n"; 
			print FAILED "$file\n";
	}

} else { 
		print "$file NOT FOUND\n"; 
}

}

$totalsize = int($totalsize / (1024 * 1024));

print "\n$totalsize MB CRAP REMOVED\n";

close OUT; close IN;
unlink("temp_filelist.txt");

5. In COMMAND PROMPT, type: cd %SystemDrive% <enter>

You must be in the root of your windows folder now.

type: perl delete_crap.txt <enter>

It will take few mins... It will return how much space it recovered.

Then you will find the following files in the root of your windows drive:

REMOVED_files.txt: It will list all the files it deleted.

FAILED_files.txt: It will list all the files it could not delete.

If you have only few files in FAILED_files.txt files, nevermind. Those are probably being used by csrss.exe (you cannot terminate that process without wrecking your system). I have those deleted from another partition. You can do so if you are dual booting.

PS: If you need MS Gothic font, remove msgothic.ttc from files_to_delete.txt. I never used or needed it but that font has been around for ages.

PS2: There is so much more useless stuff in small files. I did not want to include them in order not to mess things up. 20 files... lean and mean. But I remove about 2 GB from my windows without any ill effects.

PS3: This is a quick hack I wanted to share. It works for me. I am not responsible if it blows up your dog, happy fellows your wife or what not. Your problem.

Now your machine is 1 GB lighter.

M

Share this post


Link to post
Share on other sites

For those of you who do not want to download the Perl Interpreter, I created an exe:

STEP-BY-STEP INSTRUCTIONS (does the same as above)

1. Download: delete_crap.exe

save it to the root of your Windows drive (Example: C:\delete_crap.exe).

2. Create a text file in the root of your drive: files_to_delete.txt

(Example: C:\files_to_delete.txt)

Put inside the following text and save:

#handwriting recognition dictionaries
mshwkorr.dll
mshwjpnr.dll
MSHWCHTR.dll
PINTLGT.IMD
IMTCS.IMD
IMJPST.DIC
IMJPNM.DIC
IMJPZP.DIC

#weird named fonts
mingliub.ttc
mingliu.ttc
batang.ttc
simsunb.ttf
msyh.ttf
msjh.ttf
msyhbd.ttf
simsun.ttc
gulim.ttc
msmincho.ttc
malgunbd.ttf
malgun.ttf
meiryo.ttc
meiryob.ttc
msgothic.ttc
simkai.ttf
simfang.ttf
simhei.ttf
kaiu.ttf

3. In COMMAND PROMPT, type: cd %SystemDrive% <enter>

You must be in the root of your windows folder now.

Then in the COMMAND PROMPT, type (THIS WILL DELETE FILES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!):

delete_crap.exe <enter>

It will take few mins... It will return how much space it recovered.

Then you will find the following files in the root of your windows drive:

REMOVED_files.txt: It will list all the files it deleted.

FAILED_files.txt: It will list all the files it could not delete.

If you have only few files in FAILED_files.txt files, nevermind. Those are probably being used by csrss.exe (you cannot terminate that process without wrecking your system). I have those deleted from another partition. You can do so if you are dual booting.

PS: If you need MS Gothic font, remove msgothic.ttc from files_to_delete.txt. I never used or needed it but that font has been around for ages.

PS2: There is so much more useless stuff in small files. I did not want to include them in order not to mess things up. 20 files... lean and mean. But I remove about 2 GB from my windows without any ill effects.

PS3: This is a quick hack I wanted to share. It works for me. I am not responsible if it blows up your dog, happy fellows your wife or what not. Your problem.

Now your machine is 1 GB lighter.

M

There is NO STEP 4 above in the first post (numbers jump from 3 to 5). I could not edit my post.

Share this post


Link to post
Share on other sites

1st post item #5 and 2nd post item #3 must be:

In COMMAND PROMPT, type: cd /D %SystemDrive%\ <enter>

in order to accommodate all command prompt openings (for example, mine opens on a different drive than the system partition).

Share this post


Link to post
Share on other sites

Here is a single exe that will do it all. Just download it anywhere and run it.

delete_crap_full.exe

NOTES

1. If there is a file callled files_to_delete.txt in your root of windows partition, it will use that file. If not, it will create one with the defaults.

2. It will create the files REMOVED_files.txt and FAILED_files.txt as above. REMOVED_files.txt will include how much space it deleted at the end.

3. If you want to see the outcome run the exe from a COMMAND PROMPT.

4. This one will use only the SYSTEM DRIVE. If you have Windows at C:, it will delete from C: only. If you dual boot, you cannot use this to delete from the other partition. Use the other exe or run the script.

Edited by 6_6_6

Share this post


Link to post
Share on other sites
Okay, a friend of mine installed Vista on his SSD and was shocked to see that his 16GB drive was almost full after a week of usage.

I'm not familiar with Vista, but if this were WinXP, I would advise your friend to:

1. Turn off "System Retore" (this will also delete previous restore points)

2. Uninstall the backups for MS hotfixes and service packs ( http://www.dougknox.com/xp/utils/xp_remove_hotfix_backup.zip ).

3. Review the default size of the pagefile.

Share this post


Link to post
Share on other sites
Okay, a friend of mine installed Vista on his SSD and was shocked to see that his 16GB drive was almost full after a week of usage.

I'm not familiar with Vista, but if this were WinXP, I would advise your friend to:

1. Turn off "System Retore" (this will also delete previous restore points)

2. Uninstall the backups for MS hotfixes and service packs ( http://www.dougknox.com/xp/utils/xp_remove_hotfix_backup.zip ).

3. Review the default size of the pagefile.

We never use System Restore, Hibernation and a Pagefile to start with.

And as for #2, it is not wise to delete backups of hotfixes and service packs or anything microsoft puts. They are there for Windows File Protection. You cannot use System File Checker to fix system file problems afterwards.

Share this post


Link to post
Share on other sites
And as for #2, it is not wise to delete backups of hotfixes and service packs or anything microsoft puts. They are there for Windows File Protection. You cannot use System File Checker to fix system file problems afterwards.

WFP does not use backups. It only uses %windir%\system32\dllcache\ folder

If 'dllcache' content is lost or corrupted for any reason, you can force re-create by 'sfc /scannow'

Here is a single exe that will do it all. Just download it anywhere and run it.

since 'administrators' group is hard-coded, it doesn't work with non-English Vista.

Can you take it from parameter? 'delete_crap_full Administrators'?

Share this post


Link to post
Share on other sites

You can clean some space after installing SP:

- vsp1cln.exe (SP1)

- compcln.exe (SP2+)

Using vLite you can wipe out up to 1.7 Gb of junk in distro (2-3 Gb on installed system), mostly noticeable (with SP1 integrated):

- printer drivers - 438.5 Mb

- Media Center (Live TV/Radio/Photo) 252.4

- Tablet PC 132.3

- Simplified Chinese 109.5

- Help - 88.9

- Natural Speech recognition - 83.0

- Card games - 75.2

- Movie Maker 71.2

- Music and Video Samples 68.2

- Traditional Chinese 67.7

- Japanese + Corean 58.9

- Wallpapers 43.7

- speech recognition 43.6

Share this post


Link to post
Share on other sites
since 'administrators' group is hard-coded, it doesn't work with non-English Vista.

Can you take it from parameter? 'delete_crap_full Administrators'?

What do you have in non-English Vista? This is for ENGLISH-only. I am not sure removal of these would not harm your system on non-english systems. You might be needing these fonts, etc. I take no responsibility.

Here it is. Get perl. Save to a text file.

Run:

perl delete_crap_full.txt NonEnglishAdmin <enter>

I am not sure its effects on non-English systems. So I won't be making an exe.

$root = $ARGV[0];

$sysdrive = "$ENV{'SystemDrive'}";
chdir("$sysdrive\\"); 
chdir(".."); 


if (-e "files_to_delete.txt") { 
open(IN,"files_to_delete.txt"); 

} else {

open(OUT,">files_to_delete.txt");

print OUT <<VVV;
#chinese/korean happy fellow knows what handwriting recognition dictionaries
mshwkorr.dll
mshwjpnr.dll
MSHWCHTR.dll
PINTLGT.IMD
IMTCS.IMD
IMJPST.DIC
IMJPNM.DIC
IMJPZP.DIC

#happy fellowed-up named fonts
mingliub.ttc
mingliu.ttc
batang.ttc
simsunb.ttf
msyh.ttf
msjh.ttf
msyhbd.ttf
simsun.ttc
gulim.ttc
msmincho.ttc
malgunbd.ttf
malgun.ttf
meiryo.ttc
meiryob.ttc
msgothic.ttc
simkai.ttf
simfang.ttf
simhei.ttf
kaiu.ttf


VVV

close OUT;
open(IN,"files_to_delete.txt"); 
}


system("dir /s /b > temp_filelist.txt");

open(REMOVED,">REMOVED_files.txt");
open(FAILED,">FAILED_files.txt");
open(NOTFOUND,">NOTFOUND_files.txt");

open(OUT,">file_paths.txt");

while ($file=<IN>) {
$found = '';
next if $file =~ /^#/;
next if $file =~ /^\s+$/;
next if $file !~ /\S{5,}/;
chomp $file;

open(LIST,"temp_filelist.txt");
	while ($list=<LIST>) {
		chomp $list;
		if ($list =~ /$file/) {
			print OUT "$list\n";
			$found = 1;
		}
	}
close(LIST);

if ($found) { print "FOUND: $file\n";} else { print NOTFOUND "$file\n"; }
}

close OUT; close IN;

open(IN,"file_paths.txt");

while ($file=<IN>) {
$found = '';
next if $file =~ /^#/;
next if $file =~ /^\s+$/;
next if $file !~ /\S{5,}/;
chomp $file;

if ($size = -s "$file") { 
	system "takeown \/f \"$file\"";
	system "icacls \"$file\" \/grant $root:F \/t \/q";

	if (unlink("$file")) { 
		print "$file removed\n";
		print REMOVED "$file\n";
		$totalsize += $size; 

		} else { 

			print "$file COULD NOT BE REMOVED\n"; 
			print FAILED "$file\n";
	}

} else { 
		print "$file NOT FOUND\n"; 
}

}

$totalsize = int($totalsize / (1024 * 1024));

print REMOVED "\n$totalsize MB CRAP REMOVED\n";
print "\n$totalsize MB CRAP REMOVED\n";

close OUT; close IN;
unlink("temp_filelist.txt");

Share this post


Link to post
Share on other sites
Here it is. Get perl. Save to a text file.

Thanks! Script is good for cleaning already installed OS.

But if there is need to install OS, I prefer to delete crap from distributive and than install.

Vista_x86_RTM_SP2 original size = 2.76 Gb, without crap = 0.73 Gb

When installed, it takes 2.47 Gb on system drive (+ pagefile + hiberfil). After installing IE8 and performin full WU, it takes 3.4 Gb on system drive

Share this post


Link to post
Share on other sites
I always delete the following and open up about 1.1 GB of space (20 files, but they are backup up all over):

That is not backups, but hard links. Hardlinks don't take space (only record in MFT). User software (Explorer or another file manager) do not distinguish files from hardlinks, therefore reports wrong size.

You can count actual size by looking at free drive space before and after cleaning.

Share this post


Link to post
Share on other sites

Explorer is the shell. As far as OS is concerned, hardlinks are taking up space. 90% of WinSxS is hardlinks. You have 4 GB space, 10 GB WinSxs, try to copy a 5 GB file and see if hardlinks are taking space or not. Or try to install a program when you have no space but a 10GB WinSxS hardlinks. All share a common API and for all practical purposes, hardlinks are taking up space as far as the user is concerned.

Since no way of knowing which is the base file of a hardlink, we are removing all.

That is not backups, but hard links. Hardlinks don't take space (only record in MFT). User software (Explorer or another file manager) do not distinguish files from hardlinks, therefore reports wrong size.

You can count actual size by looking at free drive space before and after cleaning.

Share this post


Link to post
Share on other sites

That is what I do too. No need to install 1GB of printer drivers in the first place.

Some might find this useful due to licensing issues -- you cannot slipstream without breaking your license agreement.

But if there is need to install OS, I prefer to delete crap from distributive and than install.

Vista_x86_RTM_SP2 original size = 2.76 Gb, without crap = 0.73 Gb

Share this post


Link to post
Share on other sites
Some might find this useful due to licensing issues -- you cannot slipstream without breaking your license agreement.

If you do not integrate SP, slipstreaming is not used.

I take Vista with SP2 from MSDN Subscriber Downloads and remove components (no SP/hotfiex/drivers integration) with vLite.

As far as I know, slipstreaming is not used at this stage.

Share this post


Link to post
Share on other sites

I used the term broadly to mean nliting. It breaks the license agreement.

Some might find this useful due to licensing issues -- you cannot slipstream without breaking your license agreement.

If you do not integrate SP, slipstreaming is not used.

I take Vista with SP2 from MSDN Subscriber Downloads and remove components (no SP/hotfiex/drivers integration) with vLite.

As far as I know, slipstreaming is not used at this stage.

Share this post


Link to post
Share on other sites

I think this exe is over ambitious. I know you'll blame me for not reading your code, but you deleted my backup fonts in c:\windows\Fonts_R_Junk and I didn't expect or want that. I notice that you also found fonts in several other places. Why not just limit to the system font folder, usually at C:\windows\fonts? That seems like it would get 99% of the job done.

Share this post


Link to post
Share on other sites

It deletes _ONLY_ the fonts specified at the first post.

If you are trying to delete these fonts, why the heck are you keeping backups of them to start with? We are trying to save space from system drive!

Moreover, why the heck are you keeping backups within WINDOWS folder? The title reads "DELETING 1.1 GB from WINDOWS folder"

As for your question, those fonts are not in fonts folder -- they are in various directories in WinSxS folder too.

I am sorry, but the script is done to save space. Its job is not to fix inherent imbecility of human population. Each to his own.

I think this exe is over ambitious. I know you'll blame me for not reading your code, but you deleted my backup fonts in c:\windows\Fonts_R_Junk and I didn't expect or want that. I notice that you also found fonts in several other places. Why not just limit to the system font folder, usually at C:\windows\fonts? That seems like it would get 99% of the job done.

Share this post


Link to post
Share on other sites
And as for #2, it is not wise to delete backups of hotfixes and service packs or anything microsoft puts.

Which is why you wrote a script to delete files that microsoft put there.

Explorer is the shell. As far as OS is concerned, hardlinks are taking up space.

Wrong. Hardlinks do not take up space as far as the OS is concerned. They do not occupy free space. Deleting them does not make more free space available.

You have 4 GB space, 10 GB WinSxs

And this has nothing to do with it. Hardlinks do not affect available space on your drive. They do not occupy free space. Deleting them does not make more free space available.

You can have a 15GB drive, 18GB WinSxS and 10GB free space.

for all practical purposes, hardlinks are taking up space as far as the user is concerned.

Wrong. They do not occupy free space. Deleting them does not make more free space available. They do not reduce the amount of free space reported or available.

Say you have 10GB of hardlinks to one file. You delete all of them but one. You gain zero free space. Likewise, create 10GB of hardlinks to one file. You do not lose any free space.

Since no way of knowing which is the base file of a hardlink

Wrong. There is.

But that's still irrelevant, because hardlinks do not take up space.

Its job is not to fix inherent imbecility of human population. Each to his own.

The only imbecility you need to fix is your own.

Edited by qasdfdsaq

Share this post


Link to post
Share on other sites

qasdfdsaq - Hey...you're my new best friend.

6_6_6: You know you seem to be a pretty good, albeit overambitious, programmer. It's too bad that you're a jerk. I knew you would blame me for your overambitious, and, I've decided, buggy code.

>If you are trying to delete these fonts, why the heck are you keeping backups of

>them to start with? We are trying to save space from system drive!

*You* are trying to save space on your system drive. You should not try to speak for what *I* am trying to do, because you don't know. I don't like to browse through all those garbage fonts when I'm in Word, that's why I want to unload them. However because I'm not as reckless as you, I took the prudent step of backing up the fonts before I uninstalled them. In case I trimmed a few too many, I had a backup from which to restore. After a certain time I could burn that folder out to a DVD or move it elsewhere or whatever. As for storing the backup in the windows folder, that's a perfectly good place to put it, right next to the fonts folder where it's nice and visible and convenient. The only thing I didn't expect was for some yahoo like you to go searching through my windows folder indiscriminately deleting files on a wildcard basis.

Your code is buggy. It should not search through the windows folder and delete the font files anywhere it finds them. That's dangerous, reckless, and wrong. Instead, it should target the folders where you know the fonts will be and delete them there only. Also your code should go ahead and move the files to a backup location for human disposal, just in case the dog blows up. At the very least you should advise your readers that they should backup the font files before running your program. Let me ask you this: is it your script's intended purpose to delete fonts from c:\windows\Fonts_R_Junk? No it's not, so therefore by definition your code has a bug.

I've run in to many programmers like you. Unwilling to accept feedback. I know I'm preaching to a wooden board, but you should not resist feedback. No one knows everything, no matter how smart they are. A know it all like you resists learning and therefore resists growing. Instead you should be grateful and gracious when feedback is offered and you should consider it carefully before deciding its value.

Share this post


Link to post
Share on other sites
And as for #2, it is not wise to delete backups of hotfixes and service packs or anything microsoft puts.

Which is why you wrote a script to delete files that microsoft put there.

I wrote a script to remove KOREAN/CHINESE fonts that no user of english language would need. You don't have to jump like a limp dick out of a torn underwear for the sake of disputing something with your toilet rambilings.

Explorer is the shell. As far as OS is concerned, hardlinks are taking up space.

Wrong. Hardlinks do not take up space as far as the OS is concerned. They do not occupy free space. Deleting them does not make more free space available.

You are really getting on my nerves with your bullshit, so shut the happy fellow up:

hardlink2.jpg

Since no way of knowing which is the base file of a hardlink

Wrong. There is.

No, there is not. There is no such thing as a first link to a file, and every file is a hard link to itself and when ref count is 1, there is no way of differentiating which one was hard linked against which one. This is not unix where inode count and dereferences would ascertain the original file.

Now get lost and go crap on other topics.

Share this post


Link to post
Share on other sites

I am not gonna dignify your imbecility with an answer.... Well, I will, it is impossible to stay put against the degree of it!

Which sane-minded person would read a title "DELETING 1.1 GB from WINDOWS folder" and complain when the script fscks his wife or deletes fonts from WINDOWS folder! And moroever, which sane-minded person makes a backup of THE VERY FONTS he is trying to delete to recover space??? And does the backup to Windows folder???? This is PRICELESS !

qasdfdsaq - Hey...you're my new best friend.

6_6_6: You know you seem to be a pretty good, albeit overambitious, programmer. It's too bad that you're a jerk. I knew you would blame me for your overambitious, and, I've decided, buggy code.

>If you are trying to delete these fonts, why the heck are you keeping backups of

>them to start with? We are trying to save space from system drive!

*You* are trying to save space on your system drive. You should not try to speak for what *I* am trying to do, because you don't know. I don't like to browse through all those garbage fonts when I'm in Word, that's why I want to unload them. However because I'm not as reckless as you, I took the prudent step of backing up the fonts before I uninstalled them. In case I trimmed a few too many, I had a backup from which to restore. After a certain time I could burn that folder out to a DVD or move it elsewhere or whatever. As for storing the backup in the windows folder, that's a perfectly good place to put it, right next to the fonts folder where it's nice and visible and convenient. The only thing I didn't expect was for some yahoo like you to go searching through my windows folder indiscriminately deleting files on a wildcard basis.

Your code is buggy. It should not search through the windows folder and delete the font files anywhere it finds them. That's dangerous, reckless, and wrong. Instead, it should target the folders where you know the fonts will be and delete them there only. Also your code should go ahead and move the files to a backup location for human disposal, just in case the dog blows up. At the very least you should advise your readers that they should backup the font files before running your program. Let me ask you this: is it your script's intended purpose to delete fonts from c:\windows\Fonts_R_Junk? No it's not, so therefore by definition your code has a bug.

I've run in to many programmers like you. Unwilling to accept feedback. I know I'm preaching to a wooden board, but you should not resist feedback. No one knows everything, no matter how smart they are. A know it all like you resists learning and therefore resists growing. Instead you should be grateful and gracious when feedback is offered and you should consider it carefully before deciding its value.

Share this post


Link to post
Share on other sites

You seem to be too retarded or ignorant to do simple math or read information from Windows. Let me explain for you.

You can't copy a 2.7GB file into 2.68GB of space. This is not because hardlinks are taking up that space. It's because you don't seem to understand that 2.7GB does not fit into 2.68GB of free space. You have 7.37 GB of files, plus a gigabyte or two of hard links. Hard links are not counted in total occupied space, or free space. You seem to be in some kind of dream world where you think 2.7GB free space means you actually have 3GB free space. Yeah we all wish. Hard links do not count towards occupied space and therefore they don't count towards free space. That free space you see is what you would have had even if none of those hard links exist. Please read this again until you understand the basic concept.

"I have a 100 litre petrol tank, with 80 litres of petrol in it. I can't add another 30 litres, it must be because my petrol is taking twice as much space as it should!"

No, your tank is full.

Add up all the occupied space on your drive excluding the WinSxS folder. Add the size of the WinSxS folder. Compare that to the total occupied space on the disk. Do some math.

Or let me do that for you.

hl.png

Lets delete as much of the WinSxS folder as we can, and see what happens (Warning: Do not do this at home)

Say we have 66.7 GB of data on the drive and 33.2 GB free space, including hard links "occupying" 15.7 GB as you say. We delete x GB of hard links, so we should have 15.7 - X of hard links, 66.7 - X GB of occupied space and 33.2 GB + X of free space, right?

hl2.png

We manage to delete 15.4GB of hard links. By your logic, 15.4GB of hard links take up 15.4GB of space.

We delete 15.4 GB consisting of many hard links from 66.7 GB of files total. This should reduce occupied space by 15.4 GB.

66.7 GB - 15.4 GB = 51.3 GB

It does not. Occupied space has reduced by 9.6 GB (66.7 - 57.1 = 9.6)

We should also see an 15.4 GB increase in free space.

33.2 GB + 15.4 GB = 48.6 GB.

We don't. Free space has increased by 9.6 GB (42.8 - 33.2 = 9.6)

i.e. Hard links do not take up space. They do not occupy free space. Deleting them does not make more free space available. What we've done is delete 9.6 GB of files + 5.8 GB of hard links, which are taking up no space.

If you still don't understand how this works, I'm afraid you have no future.

Before you start making things up such as they're somewhere else on the drive, such as system volume information (system restore):

hl3.png

Also

There is no such thing as a first link to a file, and every file is a hard link to itself and when ref count is 1, there is no way of differentiating which one was hard linked against which one

When ref count = 1, then that is your base file.

Edited by qasdfdsaq

Share this post


Link to post
Share on other sites

I am not gonna read your novel, summarize it jackass.

This drive had 1.6GB free space after install. After running the program, the free space is 2.7GB -- 1.1GB gone. That is the main point -- hardlinks are not.

The program deleted all these from WinSXS folder and others said those are hard links that program deleted and they don't take up space. Whatever fonts are deleted, 1.1GB gone from that drive after running the program. Got it? Why don't you run it and tell me how much of what is deleted?

You can't copy a 2.7GB file into 2.68GB of space. This is not because hardlinks are taking up that space.
Edited by 6_6_6

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this