Maggie's FarmWe are a commune of inquiring, skeptical, politically centrist, capitalist, anglophile, traditionalist New England Yankee humans, humanoids, and animals with many interests beyond and above politics. Each of us has had a high-school education (or GED), but all had ADD so didn't pay attention very well, especially the dogs. Each one of us does "try my best to be just like I am," and none of us enjoys working for others, including for Maggie, from whom we receive neither a nickel nor a dime. Freedom from nags, cranks, government, do-gooders, control-freaks and idiots is all that we ask for. |
Our Recent Essays Behind the Front Page
Categories
QuicksearchLinks
Blog Administration |
Friday, April 26. 2013Doc's Computin' Tips: Freeing up hard drive space
When it comes to running programs, it really doesn't matter how many other programs you have on your computer. Normal programs are 'static', just sitting there awaiting the call, and when you fire up a program, those are the only files being read. It can, however, make a big difference on a few other levels, like running a virus scan, a fix-it program, or making an image file backup of the whole C Drive. More files means more time to scan, fix or copy. And since we're talking about files that might be multiple gigs in size, this is the real deal. I've covered a couple of these in the past, but only in regards to a related subject. This time we'll look specifically at reducing the size of the C Drive. There are five main areas of concern: 1. Getting rid of the 2 gigs of unnecessary backup files Windows 7 left after doing its big 'Service Pack' update 2. Getting rid of the 2-gig 'Hibernation' file 3. Getting rid of the 4-gig 'pagefile' 4. Cleaning out the 'Temp' folder 5. Scanning the drive for any large 'temp' files a program might have left We shall pull out our #10 scalpel below the fold. Or blowtorch, if necessary. 1. When Windows 7 installs its big 'Service Pack' as part of the Windows Updates, it backs up a whole shitload of files so it has something to fall back on if the update doesn't work. Unfortunately, it forgets to delete them after it does work, so this will clean things up. Highlight the following, hit Ctrl-C to copy it to memory, then right-click in the DOS box and 'Paste'. Hit the Enter key and kick back. Once it gets to 100%, it'll take a fair while to go through things. Your hard drive light should be blinking like mad the whole time. c:\windows\system32\dism /online /cleanup-image /spsuperseded Paste or type this into the DOS box and hit the Enter key: powercfg -h off That turns it off and gets rid of the mega-file. Close the DOS box. 3. The 'pagefile' is a large file on the root of the C Drive, usually somewhere between 2 and 4 gigs in size. It's a valuable file, but since Windows lets us put it on any partition we like, we'll take advantage of that. If you have a second hard drive, put it there, otherwise any partition besides the C Drive will work fine. — Open Control Panel, System, 'Advanced system settings'. — Click on the first 'Settings' button, then the 'Advanced' tab, then the 'Change' button. — Click the drive you want the pagefile on, then down below click the 'System managed size' gadget, then 'Set'. — Click on the C Drive (which should have 'System managed' by it), select 'No paging file' down below and 'Set'. The system will want a reboot. Note that the pagefile is a 'hidden' file and you won't be able to see it (to verify it's now on the other drive) unless your system is set to view hidden files. To do so, go to Control Panel, 'Folder Options', the 'View' tab, select 'Show hidden files'. You might also want to uncheck 'Hide extensions...' while you're there, just so you can see the complete file names. 4. The 'Temp' folder is where things like Setup programs temporarily stash their install files, and many don't clean up after themselves. It can grow to immense size over time. A handy program that cleans out the Temp folder (among many other things) is the popular CCleaner. Install the rascal, run it. On the main panel, if you use Internet Explorer, uncheck everything but 'Temporary Internet Files'. If you use Firefox (or any other browser), click on the 'Applications' tab and do the same thing. Keeping specific cookies (so you don't have to re-log on to certain sites) but deleting the rest takes a bit of effort, but can be done. Details are here. Click on 'Options', 'Settings'. All boxes at the top should be unchecked except 'Automatically check...'. To run the main program, click 'Run Cleaner'. If a browser or email program is open, it'll ask you to close it. That takes care of the possibly-humongous 'Temp' folder and a bunch of lesser clutter. To give the Registry a clean, click 'Registry', then 'Scan for Issues', then 'Fix selected issues'. This really doesn't make any practical difference, but it feels good. 5. Lastly, we'll give the whole C Drive a scan with TreeSize, which sorts the drive by file size, then we'll examine the biggest brutes to make sure they're on the level. Install, fire it up. Click on 'Options' and uncheck 'Show Long Tooltips'. Click on the little folder icon, select the C Drive and let 'er rip. The 'Windows' folder will most likely be at the top of the list, and probably anything inside of it is legitimate. What we're looking for are large temp files that some program was in the middle of creating when suddenly the system melted down or the program barfed and didn't get the chance to delete it. These will usually be in one of three places; the folder the program was installed in, one of the ten thousand miscellaneous folders in the 'Users' folder, and the 'Temp' folder, which we've already taken care of. Second on the list will probably be 'Program Files'. Click on the little + next to the name to expand it. Top of the list will probably be 'Common Files', followed by a bunch of program folders. If any of the program folders look 'suspicious', like over 200 megs, examine it and see if there's one big file that seems out of place. If it's got a legitimate file extension, like ".dll" or ".exe", that's okay. You're looking for any file that either doesn't have a file extension, or might actually have a ".temp" extension. Then do the same thing with the 'Users' folder. Start opening the larger folders, figuring out why they're so big. If it ends up that it's nothing more than a whole shitload of files, that's normal. Again, what you're looking for is a single file (or two) that are much larger than anything else in the folder. In my experience, I can think of two programs that have left mega-sized files behind, Nero (disc tool) and SoundForge (audio editor). Nero had barfed at the end of making a 4-gig DVD image file and there the puppy sat, wasting some serious drive space. SoundForge did something similar with a couple of 2-gig full-movie audio files. As I recall, the Nero file was in 'Users' and the SoundForge files were in the SoundForge program folder. Another helpful program when it comes to "figuring out where the big stuff is" is a program called DiskPie. The latest version is now commercialware but the original free version is here. It'll show you where everything is in pie graph form. Commenter KF also recommended WinDirStat, which looks pretty slick. Any questions, additions or corrections, give a holler in the comments like usual. Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Very interesting! I've got both of those bad boys on the C drive, soon to be history, and Service Pack 3 in.
Also, thanks for the tip on Firefox yesterday. Have you compared the two spell-checkers? Great post, Doc. I did the two DOS routines when you mentioned them before, but never knew I could move the pagefile, plus Treesize found a whole shitload (at least 3 gigs) of files for some game I had uninstalled years ago (or so I thought) in the "Users" folder. Good stuff, pardner!
Thanks Doc! Already have CC cleaner and like it. Did the disk cleanup in dos and turned off the hibernate. Appreciate it. ( and it took the machine about 10 minutes do wipe the Windows7 stuff btw )
Glad t'help. The main difference between DOS and Windows is that DOS actually deletes the files, whereas Windows just moves them to the Recycle Bin, which doesn't take near as much time. And DOS is much more step-by-step, methodically going down the list taking care of each file in turn. Kind of a "slow but sure" routine. Nice to have it in a case like this, though.
Great suggestions Doc. I've also used WinDirStat for a visual representation of what's on the hard disk.
Thanks, bud. WinDirStat looks good enough that I included it in the text.
Windows 7 SP 3 already? I must have been out to lunch. I'm only up to SP 1, and that installed just a week or two ago.
Whoops, you're right. I was thinking of the general Service Pack, the one that covers the Office Suite, etc. Text has been changed, and thanks.
Doc, contact me off the public forum. I have a couple ideas for you to make money. No fooling, nothing out of line. I just do not feel comfortable discussing biz on a public forum.
chas A further method to delete temp files:
c:\del *.tmp /s the /s switch will include the subfolders. Doc, do these steps also apply to Win XP Pro ? Every time I do an update, I get a low on memory error message. If not, what is the best program to make the C drive larger. Thx in advance.
Woody - I gather that TreeSize will work on an XP system, so that step's viable, as well as using CCleaner, but the ones using the DOS box definitely won't work. As I recall, the pagefile can be moved with XP.
None of this, however, has anything to do with a "low on memory" message. Memory is a chip or two on the motherboard, disk space refers to the hard drive(s). The first thing I'd suggest would be to go to here and get rid of most of the pre-loaders. That's probably what's causing the problem. If not, you might consider upgrading the amount of memory the machine has. The chips are fairly cheap, especially for an older machine at this point. But the pre-loaders are probably the snag here. Let me know how it works out. Registry files are called hives because they contain B-trees or Balanced-trees or Binary-trees. Wink...wink...nudge...nudge.
If a registry file has 1,000,000,000 or one million keys and is perfectly balanced, the maximum number of comparisons would be twenty with an expectation of ten. However, over time, these can become very unbalanced increasing the number of comparisons required to find a particular key. I consider the registry concept to be one of Windows greatest architecture flaws. There are numerous programs out there that claim to clean registry files, but I have never seen one that claims to reheap them. See C. A. R. (Tony) Hoare's heapsort. What proves your point about Registry cleaners is that you can run one, even two, and a third will still catch a few things. Norton's SystemWorks has a Registry cleaner/compactor that I run when it hits 10% fragmented. I honestly don't think it does any good, but if feels good.
|