How to Defrag Your Computer
& Consolidate Files on Your Hard Drive

Is your PC taking too long to start? Are programs loading too slowly? If so, your hard disk might be suffering from a phenomenon called fragmentation.

What is disk fragmentation and why is it a problem?

When you save files, your computer writes the data to physical “slots” on your hard drive called data clusters. As long as these clusters are aligned one after another, retrieving the data and piecing it back together is fast and easy.

Fragmentation is what happens as your hard disk fills up over time: you delete older files and the free slots available for saving new files become scattered across the disk. So instead of having a single file occupying one continuous stretch of the disk, it ends up spread out in different places. The files are “fragmented”, and piecing them together can take a lot of time. The performance hit can be quite severe as programs and games constantly need to collect and piece together the various files.

The solution is to defragment your hard disk to speed up file access, boot times and overall work performance.

What are the performance benefits of defragmenting a hard disk?

Depending on what you do on a daily basis and how fragmented your hard disk is, you may see a big benefit in the following scenarios:

  • Boot time: since Windows loads up hundreds of files during startup, a defragmented hard disk could be the key to a faster booting PC.
  • Playing games: since games tend to load up a ton of textures and big maps, they could benefit significantly and run more smoothly overall after your disk has been defragmented.
  • Working: launching applications and working with huge files can feel snappier if you defrag your HDD on a regular basis.

So how do you do it?

How to defrag Windows 10 (or 8, or 7)

Windows has actually gotten smart about managing data, and runs defrags automatically by default. But if you want to run one yourself, just follow these steps (they are similar in all three versions):

1. Search for the defrag tool: click on the Start button in the lower left corner:


Type in Defrag to start the search for the built-in defragmenter tool:


2. Select the defrag tool: Click on the search result for the Defrag tool (Defragment and Optimize Drives in Windows 10). You will then see an overview of all your hard disks, both internal or plugged in. First and foremost, you should defrag drive “C:” as this is likely where both Windows and your programs are stored. Now depending on the degree of fragmentation, this could take a few minutes to several hours, so you may want to do that overnight.

It doesn’t hurt to defragment external USB hard disks, but the real limitation with those is USB connection speed, not fragmentation.


3. Set a defrag schedule: make sure your defrag runs on a regular schedule by going to the Settings page and setting it to Weekly (if that’s not already set by default). Be sure to leave your PC on at the scheduled times, or the defrag will not be run. 

How to defragment Windows XP:

Windows XP doesn’t have an automatic defragmenting tool, so you will need to regularly run the process on your own. Here’s how:

1. Click Start, go to All Programs, then Accessories and finally to System Tools, and then click on Disk Defragmenter.

2. Select the drive that you want to defragment.

3. Click Defragment to begin the operation.

How to defragment a Mac running OS X

The OS X system treats data very differently from the way Windows does, and you generally will not need to defragment your hard drive. However, it is important to keep at least 9 GB of memory free so that the system can sort itself out. 

If you deal with very large files that constantly read and write to the system (such as video or audio editing), you might find marginal benefits to occasionally running a third-party defragmenting program, but Apple regularly makes these obsolete.

SSDs – When Defragmenting Won’t Work!

SSDs (Solid State Drives) work very differently from mechanical hard disks. They don’t have moving parts that read and write to different sections, but instead retrieve information almost instantly wherever it is stored.

That’s why most modern systems disable the defrag option when an SSD is detected.

However, these kinds of drives suffer from a completely different flaw that the newer Windows operating systems treat automatically. We do not recommend to use an SSD with Windows XP, as this older operating system was not designed to work with SSDs.

On SSDs, the defrag tool will allow you to TRIM the disk, which improves the lifespan and performance of the drive. Just click the Optimize button in Windows’ built-in defragmenter.

Why using a 3rd-party defragmenter is better

Good optimizers like AVG PC TuneUp go way beyond what Windows can do by offering two defrag methods:

  • a “fast” method, which puts scattered data back together,
  • a “thorough” method, which puts frequently used files at the beginning of the mechanical drive to boost daily performance even more.

AVG PC TuneUp will run regular defragmentation on your registry to increase performance and clean up temporary files to prevent junk data from eating up your disk space. By using a tool like this you will benefit from a more thorough defragmentation, which can help you achieve an overall performance increase.

AVG TuneUp - Unlimited

Tune and clean up all your devices

AVG logo | United States