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
- Press Windows + I to launch the Settings app.
- Under the System tab, click on the Storage option.
- Scroll down and select Advanced storage settings.
- You’ll see a drop-down menu. Choose Drive optimization.
- 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.
- 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.
- Wait for your PC to complete analyzing.
- Once the analysis is complete, select Optimize.
- The disk defrag will then begin. Wait for your computer to complete the process.
Optional: You can automate the defragment process
- Under Schedule optimization, select Change settings.
- Select Choose next to Drives.
- 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.
- Click on the Frequency drop-down and choose a frequency of your choice.
- Click OK after making your choices.
Defrag using the Command Prompt
Follow the steps below to defrag your desired drive using the Command Prompt.
- Press the Windows key and search for Command Prompt. Click Run as administrator.
- You’ll see a User Account Control prompt. Click Yes.
- Once the command prompt opens up, type
and press Enter. You can replace C with the disk of your choice.
- 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.