How to Defrag Windows 11 [3 Ways]

Optimize your PC so that it runs with utmost efficiency

Reading time icon 4 min. read

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

windows 11 defrag

Defragmenting your drive will improve the performance of your computer. Fragmentation is unavoidable, but keeping it in check is key if you want your PC to run smoothly.

Find below step-by-step instructions on how to defrag Windows 11:

How can I defrag my Windows 11 PC?

1. Use the defragmentation tool from Windows

1. Click the Search icon in Taskbar.

2. Type defrag in the search box and select Defragment Optimize Drives from the list of results.

search for defrag app windows 11

3. When the window opens, you’ll see a list of all your drives and their current defragmentation status.

4. Select the drive that you want to analyze, and click the Analyze button.

select drive to defragment in windows 11

5. Wait for the process to finish.

6. If your drive is fragmented, select it and click on Optimize.

how to defragment hard drive windows 11 button

7. Wait for the process to finish. It can take a while depending on the fragmentation level.

Your Windows 11 PC has a built-in app that you can use to defragment your hard drive. It is called Defragment Optimize Drives and can be used to easily optimize your PC.

2. Use the Command Line

  1. Press Windows Key + X and choose Windows Terminal (Admin).
  2. To analyze your drive enter the following command, but be sure to replace X with the letter of your drive:
    defrag X: /a
  3. After the scan, you’ll see information about your hard drive, including the fragmentation level and a note saying whether you need to defragment your drive.
  4. Now enter the following command to defrag that drive:
    defrag X:
  5. Wait for the process to finish.

There are also a couple of hidden commands that might come in handy. To defrag all drives that are available on your PC, use the following command:

defrag /C

To defrag all drives except the specified ones, run this command:

defrag /E X:

How can I schedule defragmentation in Windows 11?

  1. Click on Windows Search (the magnifying glass from Taskbar), type defrag and select the Defragment and Optimize Drives app from the results.
  2. In Scheduled optimization click on Change settings.
  3. Set frequency to Weekly or Monthly.
  4. Now click the Choose button.
  5. Check the drives that you want to schedule defragmentation for and click on OK.
  6. Click OK once again to save the changes.

3. Use Command Prompt

  1. Type cmd in the Start bar.
  2. Under Command Prompt, select Run as command prompt as administrator
  3. Type the following command:
    defrag C:(replace C with the letter of the drive you want to defrag in Windows 11).defrag c command prompt
  4. Press Enter and wait for the process to complete.

What does disk defragmentation do?

Disk defragmentation reorganizes scattered data on your hard drive, placing it closer together. This reduces the time the hard drive takes to find and access files, improving your computer’s performance by making data retrieval faster and more efficient.

Should I defragment my SSD?

Solid-state drives don’t require defragmentation because of two reasons:

  • SSD has no moving parts: the main benefit of defragmentation is performance improvement. With SSDs being 10 to 20 times faster than the best hard drives and having no mechanical disks that need to be read, there’s no need for defragmentation.
  • SSD has a limited amount of write cycles: SSDs last less than hard drives because they have a limited number of write cycles. This means that moving the files and writing them during the defragmentation process will reduce the lifespan of your SSD by using its write cycles.

How can I optimize my SSD?

  1. Click on Windows Search from Taskbar, type defrag, then select the Defragment and Optimize Drives app.
  2. Click on the SSD drive to select it and clic on Optimize.

It’s not recommended to defragment your SSD but you can optimize it instead, with no risks. The procedure is called trimming, and you can access it just like on an HDD, by using the steps above.

The trim action identifies areas on the disk with unused data. In other words, the files that were deleted and are waiting to be overwritten.

That is because when you delete a file, it doesn’t get erased from the disk. They are only marked as free, available space. But after the trimming process, the data will be deleted.

It’s an active way of optimizing your SSD but it’s not as near as effective as the defragmentation procedure for an HDD.

Wrapping up

Knowing how to defragment your HDD is essential if you want good performance. It can prolong the lifetime of your hard drive and help your PC run smoother.

If you want to keep tabs on this practice, you can also schedule disk defragmentation.

Take a look at our list including the best SSD for your PC and consider the proper option for your system. Even more, you could also consider using a laptop with both SSD and HDD for increased performance and storage.

How often do you defrag your drive for performance improvements? Let us know in the comments below.

More about the topics: Windows 11