How to Defrag in Windows 11

Fragmentation is when a single file’s components are stored in different locations on the hard disk. Whenever you try to access the file, the computer will have to work harder to locate these file “fragments” on the hard disk, which translates to slower performance.

Fortunately, Windows allows you to defragment a hard disk. In this guide, we help defragment your hard disk in your Windows 11 PC.

Defrag using Defragment and Optimize Drives app

  1. Press Windows + I to launch the Settings app.
  2. Under the System tab, click on the Storage option.

    Choose the Storage option
    Launch Settings and select Storage.
  3. Scroll down and select Advanced storage settings.

    Click Advanced storage settings
    Select Advanced storage settings.
  4. You’ll see a drop-down menu. Choose Drive optimization.

    Select Drive optimization
    Pick Drive optimization from the drop-down menu.
  5. Alternatively, you can press the Windows key and search for defrag. You’ll find the Defragment and Optimize Drives app. Click Open to launch the app.

    Click Open to launch the Defragment and Optimize Drives app
    Enter defrag in the Search bar—Click Open to launch the app.
  6. After the Optimize Drives dialog box opens, you’ll see a list of drives on your computer. Click on the drive you want to defragment and choose Analyze.

    Choose drive and click Analyze
    Pick the drive you want to defrag and select Analyze.
  7. Wait for your PC to complete analyzing.

    Wait for your PC to analyze your drive
    Wait for your PC to analyze your selected drive.
  8. Once the analysis is complete, select Optimize.

    Select Optimize
    Click Optimize.
  9. The disk defrag will then begin. Wait for your computer to complete the process.

    Defrag in progress
    Wait for your PC to complete the defrag process.

Optional: You can automate the defragment process

  1. Under Schedule optimization, select Change settings.

    Click Change settings
    Click Change settings.
  2. Select Choose next to Drives.

    Click Choose
    Select Choose.
  3. Next, select the drives you want to defrag regularly. You can do this by checking the drive’s checkboxes. Once done, click OK to confirm your choices.

    Select the desired drives
    Select the drives you want to defrag.
  4. Click on the Frequency drop-down and choose a frequency of your choice.

    Choose frequency
    Choose the frequency.
  5. Click OK after making your choices.

    Click OK
    Select OK.

Defrag using the Command Prompt

Follow the steps below to defrag your desired drive using the Command Prompt.

  1. Press the Windows key and search for Command Prompt. Click Run as administrator.

    Open Command Prompt
    Open Command Prompt.
  2. You’ll see a User Account Control prompt. Click Yes.

    Click Yes
    Select Yes.
  3. Once the command prompt opens up, type
    defrag C:

    and press Enter. You can replace C with the disk of your choice.

    Type the defrag command
    Type the defrag command and press Enter.
  4. Wait for the defrag process to end. Once done, you can see the Post Defragmentation Report, which includes volume information like volume size, free space, total defragmented space, and largest free space size.

    Defragmentation process is complete
    View the Post Defragmentation Report.

Was this article helpful?

Leave a Comment