Your hard drive is choking on giant junk files. Jane Hoskyn reveals how to find your PC’s space hogs and delete them completely
Hard drives are getting bigger, but digital files are getting bigger faster. Two minutes of video shot on a budget smartphone equals around 200MB. Ten minutes is a gigabyte (GB). Save that 10-minute clip to your PC, create a couple of edited versions and an accidental duplicate or three, and suddenly your humble video has swallowed a tenth of your hard drive – far more space than you can free up every time you run CCleaner.
The trouble with big files
It’s not really fair to compare CCleaner’s haul of digital sewage with your digital video. One is a pointless waste of space, while the other is a personal treasure and a marvel of modern technology.
Massive files are, in themselves, brilliant. We love that it’s possible to take a 46TB (terabyte) photo like the image of Mont Blanc (www.in2white.com), and we certainly don’t miss the horribly low-resolution digital photos we were taking 10 years ago. You can store all your favourite films on your PC, export your entire email archive as one file and keep a library’s worth of books on your Desktop. It’s wonderful, but your hard drive can’t keep up. Big files are choking your PC to death.
Don’t feel too sorry for your computer, though, because it’s creating at least as many massive files as you are. Windows constantly makes vast backup files and hoards them in locked folders, where they take up far more space than much-maligned caches and temporary files.
In this feature, we’ll show you how to track down your biggest files, including the ones Windows tries to hide from you. Then we’ll reveal the best new ways to stop big files suffocating your PC – including blitzing them to smithereens.
FIND YOUR PC’S BIGGEST FILES AND FOLDERS
Discover your PC’s biggest file using Explorer
Windows Explorer, latterly File Explorer, is surprisingly good at rooting out your PC’s enormous files. Its size-search tools are almost as well-hidden as the gargantuan Windows backups we’ll come to later, but they’re easy and versatile, and useful for much more than just finding big files.
Whatever version of Windows you’re running, start by opening Explorer and clicking the drive (such as ‘Local Disk (C:)’), Library (for example, Pictures) or folder you want to search. Choose the C: drive if you want to find the biggest file on your entire PC, which can take ages; choose a Library or folder if you’d rather not wait all day for the results to appear.
In Windows XP, Vista and 7, click in the search box at the top-right, then click the little blue ‘Size:’ link under ‘Add a search filter’. This opens a dropdown menu of size ranges, from ‘Empty (0KB)’ (interesting, but not relevant here) to ‘Gigantic (>128MB)’. Don’t bother clicking Medium or Large, especially if you’re searching your whole PC – go straight for Gigantic.
In Windows 8/8.1, click Search This PC in File Explorer to open the Search ‘ribbon’ (you may have to click the Search Tools tab to make the ribbon appear). Click Size to open a dropdown menu containing Empty, Gigantic and so on, then click one to see matching files. You can then narrow the search using other dropdown boxes, including Kind (such as Video, Program or ‘Picture’ – that’s photo to you and me), ‘Date modified’ and more.
A few moments or minutes later (depending on your drive/folder size), you’ll see an unsorted list of whopping great files. To see the biggest file at the top, click the ‘Change your view’ icon, select Details and then click the Size column heading.
Unhelpfully, file sizes are listed in kilobytes (KB), so they look like a bunch of random phone numbers. Click an item to see its size in more sensible MB or GB measures in the bottom window.
Hack Explorer to find big files faster
If you find Explorer’s dropdown menus too fiddly (we do), bypass them completely by typing your filters instead.
For example, type size:gigantic into the Explorer search box and press Enter to find files over 128MB in your selected location. You can be even more specific if you prefer. Type size:>500MB to find files larger than 500MB, or even size:>50GB – whatever you deem gigantic. If you find yourself sorting a list of files bigger than 50GB, you really need to continue reading this feature.
Type a series of filters, separated by a space, to streamline the search even further. To see huge photo files only, for instance, type size:gigantic kind:photo, or to round up those massive videos you transferred to your PC last week, type size:>1GB kind:video date modified:last week. Microsoft lists many more filters on its website (www.snipca.com/16874); most work in Windows 8/8.1, despite the reference to Windows 7 in the introduction.
To save the hassle of typing the same filters every time, you can save searches as one-click shortcuts on your Desktop. Run a search, then click ‘Save search’ (Save Search in Windows 8/8.1), choose a new name for the file if you want (say, ‘massive photo’) and then click Save. Click the saved file to run that search automatically in Explorer. Alternatively, type massive photo (or whatever you’ve called the file) into Start and click it in the list of results to run the search.
Instantly see your biggest files
Windows Explorer’s search tools aren’t built for speed. Explorer indexes the contents of files, which is why you can search for words contained in documents – a very useful feature. But indexing really slows down the search, and it’s not necessary when hunting down big files. If you asked someone to find the biggest book on your shelves, you wouldn’t expect them to sit down and read all your books first.
There are loads of free third-party tools that skip the indexing and go straight for the biggest book on the shelf. The most versatile, and the best alternative to Explorer, is NirSoft’s free portable tool SearchMyFiles (www.snipca.com/16888).
The program opens in two windows: a Search Options window, where you configure your search, and an empty results window. Click the top-right Browse button in Search Options and navigate to a drive or folder. Because there’s no indexing involved, you might as well choose your local drive (‘C:\’, which is the default). SearchMyFiles only takes a few seconds to search the whole drive and then list its contents in the results windows. Click the Size column heading twice to see the biggest files at the top. To open any item in Windows Explorer, right-click it and click Select File In Explorer.
You can refine the search with filters, too. To find files larger than 100MB, for example, tick ‘At least’, then type 100 in the box next to it and select MB from the dropdown menu.
For an even faster scan that uses no filters, use the tiny free tool SwiftSearch (www.snipca.com/16886). Run the program, select your C: drive from the dropdown menu, then click Search. The list appears faster than you can sip your tea.
See a map of your PC’s space hogs
SpaceSniffer (www.snipca.com/16882) is a treat for tired eyes – which is what you’ll have after squinting at all those lists of files. Like the other tools we’ve mentioned, this free portable program scans your drive and reveals what’s taking up most space. Unlike them, it presents its results visually, so you can actually see your biggest files.
When you run the program it’ll ask you to ‘Choose your Space’. Click ‘(C:)’ to select your local hard drive, or select another connected drive (such as an external drive, partition, networked drive or even a DVD). To choose a folder instead, click Path. Then click Start, and your screen will turn into a gently shifting sea of blue and brown rectangles.
Big rectangles represent big files (blue) and folders (brown), and small rectangles represent... you guessed it... small files and folders, all growing and shrinking in real time to reflect real-time changes on your PC. When you first open the map it takes a minute or two to settle down while it scans all your files and folders. But even when it’s fully loaded it never quite stops moving, because some files and folders constantly change size – a gentle reminder that your PC is a hive of background activity.
Right-click a blue rectangle for a list of options. System files don’t have many right-click options, but photos and documents have plenty, including ‘Open with’, Properties and Delete. Click a brown rectangle to see the folder’s contents, all represented by even smaller rectangles.
SpaceSniffer works on all versions of Windows right back to 2000, so keep a copy on a USB stick to see what’s clogging up your old PCs.
Root out Microsoft’s hidden junk
Our SpaceSniffer map is dominated by two blue rectangles: ‘Pagefile.sys’ (clocking in at 5.9GB) and ‘Hiberfil.sys’ (a mere 4.4GB). Who put them there? The clue is in the filenames, which are straight out of the Microsoft jargon factory. Microsoft dumped these files in our hard drive (and yours), then hid them in Explorer so we couldn’t meddle with them.
We might forgive this if the files were vital for our PC or operating system (OS), but they’re not. They are potentially useful (see below), but so are thousands of free third-party tools that wouldn’t dream of sneaking 5GB of invisible files into your PC. When a tool does that, we usually call it malware.
Pagefile.sys (Page File) and Hiberfil.sys (Hibernation File) aren’t malware, but they clog up loads of space without asking you first. They’re not even the biggest piece of Microsoft junk in your PC. System Volume Information folder contains system restore points that Windows creates regularly, without deleting previous ones. One or two restore points can save your PC in a crisis, but you will never, ever need 150GB of them.
To see how bloated your System Volume Information folder has become, download the portable (ZIP) version of TreeSize Free (www.snipca.com/16898) and run it as administrator. Click Scan menu, then ‘Local Disk (C:)’ to load a bar chart-style list of folders with the biggest (normally Windows) at the top. System Volume Information won’t be far behind. Click the little triangle next to any folder’s name to see the files inside and how much space they’re taking up.
THIS MICROSOFT JUNK IS CHOKING YOUR PC
These files and folders are taking up far more space than they’re worth…
SYSTEM VOLUME INFORMATION
What is it? This hidden folder contains your PC’s system restore data, including restore points.
How big is it? About 10GB if your PC is new or recently wiped, but it can grow to 200GB or more as new restore points are saved and old ones aren’t deleted.
Can I delete it? You can, by right-clicking it in TreeSize Free and clicking Delete, but you shouldn’t. Some of the files in System Volume Information are needed by your OS. However, you can and should delete old restore points, which are no longer useful and can take up several gigabytes each.
HIBERNATION FILE (HIBERFIL.SYS)
What is it? This file stores data about your PC’s current state, so you can go straight back to that state after using Hibernate mode.
How big is it? Around 5-10GB.
Can I delete it? Yes, but disable hibernation first. Microsoft’s website explains how to do this, in all versions of Windows (www.snipca.com/16906). You can then delete the file from the right-click menu in a program that lets you view it, such as SpaceSniffer.
PAGE FILE (PAGEFILE.SYS)
What is it? Virtual memory. Windows uses virtual memory to keep all your processes running if your installed memory (RAM) isn’t enough.
How big is it? Normally about 5GB; may be 20GB or more.
Can I delete it? Yes, but your PC would crash more often. Instead, limit the amount of space virtual memory can use. Click System in the Control Panel, then Advanced System Settings on the left, then the Settings button under Performance. Click the Advanced tab, then ‘Change…’, untick ‘Automatically manage…’ and then click the little ‘Custom size’ button. Type 16 in the ‘Initial size’ box (this is the bare minimum) and 2000 in ‘Maximum size’. That limits virtual memory to 2GB, which is big enough to keep your PC running and small enough not to overwhelm your hard drive.
OUTLOOK DATA
What is it? All your emails, calendars, contacts and other Outlook data, backed up into two files (Outlook.pst and Outlook.ost). Here’s where to find them, depending on your version of Windows: www.snipca.com/16903.
How big is it? Up to about 50GB.
Can I delete it? If you don’t use Outlook, certainly – but the files won’t be very big. If you do use Outlook, shrink your data files rather than deleting them. Microsoft explains how to do this in different versions (www.snipca.com/16904).
REMOVE SPACE-HOGGING JUNK COMPLETELY
Delete big files and folders faster
Once you’ve rounded up your PC’s junk giants, all you have to do is delete them – right? Simply right-click them, click Delete and empty the Recycle Bin, then restart your PC to bask in your newly spacious hard drive.
In practice, however, deleting massive files and folders is a massive pain. You get as far as clicking Delete, then find yourself staring at a ‘Preparing to delete’ message all afternoon.
Windows is terrible at deleting big files and folders unless you tinker with its settings. It’s another side-effect of indexing: Windows won’t send a file to the Recycle Bin until it has indexed every last shred of the file’s data (metadata, preferences, security settings and so on). The bigger a file is, the more data there is to index; the bigger a folder, the more files have to be indexed. This can easily take hours.
You can switch off indexing, but there’s no one-click option for doing this. Instead, you have to disable indexing for individual files and folders. To do this for a file, right-click it, click Properties, then Advanced, and then untick ‘Allow this file to have contents indexed in addition to file properties’. Click the OK buttons to apply the change, then try to delete the file again. It should go to the Recycle Bin much faster than before, and the Recycle Bin will empty faster, too.
The process is similar for folders. Right click a folder, open Properties and click Advanced, then untick ‘Allow files in this folder to have contents indexed in addition to file properties’. The change may take several minutes or even an hour to apply, depending on the size and number of files in the folder, but once that’s done the folder will delete much more quickly. You may still see a ‘Calculating size’ and/or ‘Preparing to delete’ message while Windows is messing about in the background, but it’ll last a few minutes rather than several hours.
Quick trick: you can disable indexing in loads of files at once by moving them into one folder, then switching off indexing for that folder.
Remove stubborn folders using the Command Prompt
If Windows can’t delete a folder even after you’ve switched off indexing, try deleting it from the Command Prompt. Type cmd into Start, right-click ‘cmd.exe’ at the top of the results list and then click ‘Run as administrator’. Don’t skip this step: the Command Prompt is much more powerful in administrator mode.
The basic command for deleting a folder is rmdir /s foldername (change ‘foldername’ to the name of the folder you want to obliterate). Press Enter, then ‘Y’ when prompted.
If the folder fails to delete or Command Prompt can’t find it, see Microsoft’s TechNet site for numerous possible reasons and some other commands to try (www.snipca.com/16914).
Delete your overflowing Recycle Bin
Your Recycle Bin is a folder full of stuff you no longer want. If you let that stuff pile up, the bin will very quickly become the biggest waste of space on your PC. The bigger it gets, the longer it takes to empty – until it even refuses to empty at all.
The quickest way to empty a full Recycle Bin is to delete it. You can do this from the right-click menu in SearchMyFiles or TreeSize Free, or by typing rd /s %systemdrive%\$Recycle. bin into the Command Prompt after running it as administrator. Windows automatically creates a new, empty Recycle Bin folder the moment the old, cluttered one is deleted.
To prevent the Recycle Bin overflowing again, set it to empty on an automatic schedule. There’s no built-in option to do this, but you can download a simple executable file for emptying the bin (www.snipca.com/16907; click the top link) and then import it into Task Scheduler, which opens when you type scheduler into Start and press Enter.
If you want, you can cut out the Recycle Bin and set Windows to blitz items completely when you click Delete. However, we wouldn’t recommend it. The Recycle Bin is a useful safety net, and it’s no fun trying to recover a file from thin air. Instead of bypassing the bin, limit its size. Right-click it and click Properties, then type 5000 (or lower) in the ‘Maximum size’ box and click Apply. This limits the space your Recycle Bin can fill to 5GB, far less than its default maximum size of around 25GB.
Delete locked system junk and malware
Many system files and program files can be removed quickly from the right-click menu in SearchMyFiles, TreeSize Free or whatever program you used to find them on your hard drive – but some can’t. These super-stubborn files have been locked by their creator so no-one or nothing can move or remove them. Microsoft does this with some of your system files, and malware creators do it to lock their nefarious wares so that you and your antivirus can’t kill them.
To unlock these files, use FileAssassin (www.snipca.com/16915), a tiny, free tool from the makers of Malwarebytes Anti-Malware Free. You have to install it, but it takes up barely any space on your hard drive and there are no unwanted extras in the installer.
Run FileAssassin and click the ‘…’ button to select a locked file (or indeed any file) from your PC, then click Execute to unlock it and force-stop its processes so that you can delete it.
If the file is hidden in Windows Explorer, find it using SearchMyFiles and then drag it from there on to the FileAssassin window. Tick ‘Delete file’ before you click Execute so that FileAssassin deletes the file after unlocking it.
Remember that not all protected files are locked for annoying or malicious reasons – some are vital PC and program components. Always check what a file is and what it does before you get rid of it, and save a restore point in case things don’t go to plan.
SHRINK TO FIT
Not all massive files deserve to be deleted. Huge photo and video files, for example, can take up an enormous amount of hard-drive space – but that doesn’t mean you should destroy them.
One solution is to compress them so they take up less space. There are plenty of free third-party programs that do this more efficiently than Windows’ built-in compression tools. Our favourite is free open-source tool 7-Zip (www.snipca.com/16925), which lets you compress (‘archive’) files from the right-click menu, then open files you’ve compressed.
Alternatively, divide massive files into smaller parts using the free portable tool HJ-Split (www.snipca.com/16926). When you need to use the file, HJ-Split can put it back together again.
Compressing and splitting files can degrade their quality, so the best solution for big files is simply to move them to an external drive or, at the very least, to a partition away from your installed programs and OS.