In years gone by defragmenting was one of the regular housekeeping tasks undertaken to keep a PC in optimum condition. This could improve performance, plus you got to watch a pretty Tetris style graphic as the process slowly progressed.

Now, in the modern age of SSDs and powerful PCs, the advantages of defragging are questionable and in the case of SSDs, a bad idea. We’ll explain what defragging is, the benefits, and how to get it done on Windows 7, 8, and 10.

See also:

How to defrag your hard drive in Windows 7, 8, and 10: What is defragging?

In basic terms, defragmenting is exactly what it sounds like: it's a reversal of the fact that data gets fragmented across your hard drive. Over time as data is saved, resaved, or deleted on your drive, small packets of information end up deposited in random places all over the disk. This then takes longer to find as the read head has to move to multiple positions on the disk rather than being able to read the data in consecutive sectors. 

Defragmenting means that files which were split into smaller chunks and saved in different places are put back together in one place. The data is effectively compacted as the operating system removes the gaps between files. This in turn should improve the speed of your PC or laptop, even if it does so by only a marginal amount.

How to defrag your hard drive in Windows 7, 8, and 10: Should I defrag?

If your PC has an SSD installed rather than a spinning hard drive then the answer is an unequivocal no. It won’t help in any way and may very well reduce the life of your drive. Later versions of Windows automatically run optimisation routines on SSDs anyway (as do the SSD controllers themselves), so you can just let that run its course and you’ll be fine.

For PCs with mechanical, spinning hard drives, which will be most older and less expensive ones, then it’s worth doing. But don’t expect a huge boost in speed. If your machine has become sluggish then still the best way to grease its lightning is to install an SSD. The performance is usually night and day. We’ve covered this upgrade in the past, so if you want to give it a go then read out guide on how to Install an SSD in your PC.

How to defrag your hard drive in Windows 10

Windows 7 users will most likely notice the biggest difference in terms of startup times, but if that’s your main problem we think you would be much better off following the advice in our 5 Free ways to spring clean your PC guide.

 How to defrag the hard drive in Windows 7

Click the Start button, then select All Programs>Accessories. Now choose System Tools>Disk Defragmenter.

You'll probably be asked to enter your administrator password, do this then hit Defragment Now to begin the process.

How to defrag hard drive in Windows 7

And that's it. Disk Defragmenter will take a while, possibly even hours to complete, but you can use your PC throughout the process.

How to defrag the hard drive in Windows 8

If it has a hard drive your Windows 8 PC, laptop or tablet will defrag itself by default every week, thanks to the scheduled task: Optimize Drives. So if you haven't changed any settings, you shouldn't need to defrag. But if you aren't sure and you want to check the status of- or manually defrag your drive open Search (Windows+Q or swipe in from the right and open the Search Charm). Now type in 'Defragment'. One of the results will be 'Defragment and optimize your drives'. Select this.

You'll see a dialog  featuring a list of the hard drives in your PC or laptop, their media type, when they were last defragged, and how fragmented they are. You really need to defrag only if the drive is more than  10 percent fragmented. (On my severa-years-old work desktop, the two drives were both at 0 percent due to the regular background defragging.)

If you can't see a figure in Current status, to find out if a particular drive needs to be optimized highlight it and hit Analyze. Then confirm your choice. This will update the Current status column.

If any of your drives is fragmented by 10 percent or more, highlight it and hit Optimize. Confirm your choice. Again this could take minutes or hours, and you can continue to use your PC throughout.

How to defrag the hard drive in Windows 10

The process on Windows 10 is quite similar to that of Windows 8. The first thing you need to do is click on the Start Menu then search for defragment. You should see an option called Defragment and Optimise drives. Click on this.

How to defrag hard drive on Windows 7 8 10

Windows will show you a list of your current drives. SSDs will have the amount of days since they were last optimised, while traditional hard drives will display the amount of fragmentation as a percentage. If it doesn’t show this all you need to do is select the drive and click the Analyse button.

How to defrag hard drive Windows 10 8 7

A rough rule of thumb is that drives that are over 10% fragmented should be optimised. To do this you just need to select the drive and click Optimise.

That’s it. Windows will now work its magic and you can have a nice cup of tea. When everything is finished you can see if the defragging has made any improvements. Of course if it hasn't you now have a perfect excuse for investing in a brand new machine. If you want something that's really fast then you could always check out our guide to the 14 Best Gaming PCs for 2016.