Skip to content
Windows

How to Defragment Windows 11 for Better Performance

Richard
Written by
Richard
Updated 6 min read
How to Defragment Windows 11 for Better Performance
How to Defragment Windows 11 for Better Performance
Before you start
  • 10 steps
  • Needs administrator rights

Defragmenting Windows 11 rearranges broken-up files on your traditional hard drive (HDD) so your computer runs faster and opens programs without lag. Fragmentation happens when the parts of a single file end up in different sectors of the disk instead of side by side. The read head then has to jump around to collect them, and that wastes time.

A regular disk optimization brings those scattered pieces back together, so files load faster. Windows 11 already does this on its own, usually once a week, so most people only need to check that it is working or run it by hand after a lot of file changes. A solid-state drive (SSD) is different. It has no moving parts, so it gains nothing from defragmentation. For SSDs, Windows 11 runs a background command called TRIM, which tells the drive which blocks are no longer in use and keeps it healthy. You don’t need to do anything extra for an SSD. The Drive optimization tool picks the right operation for each drive type.

⚡ Quick Answer

Defragment Windows 11 by opening Settings, navigating to System Storage Advanced storage settings Drive optimization. Select your drive and click Optimize to reorganize fragmented files for better performance.

Advertisement

How to Defragment Your System Drive

To defragment Windows 11 on your system drive, open the Settings app by pressing the Win and I. Go to System, click Storage, and select Drive optimization. This reorganizes scattered files on your hard drive so your computer can read data faster and open apps without unnecessary delays.

The steps below follow that path one click at a time. The same tool is available on every edition of Windows 11, Home and Pro included. If you prefer, you can also type Defragment and Optimize Drives into Start search to open it directly.

Advertisement
  1. Open the Settings app by pressing Win+I or by clicking Start and selecting Settings.
Windows 11 Start menu accessing Settings
windows 11 start settings

The Settings window opens with a list of categories on the left, such as System, Bluetooth & devices and Network & internet. If the keyboard shortcut does nothing, use the Start button route instead.

  1. Click on System, then select Storage on the right side of the screen.
Windows 11 System Storage settings interface
windows 11 system storage

You should now see the Storage page. It shows how much space is used on your main drive and includes the Storage management options. All the drive tools you need are on this page.

  1. Click on Advanced storage settings.
Advanced storage settings in Windows 11
advanced storage settings

More options appear. Depending on your Windows 11 build, the list either expands in place or opens as a separate page. If you can’t see it, scroll down the Storage page. It sits below the Storage management options.

  1. Select Drive optimization from the menu.
Windows 11 Drive Optimization tool interface
windows 11 drive optimization

The Optimize Drives window opens. This is the classic Windows disk tool, and it opens in its own window on top of Settings.

  1. Look at the list of your drives and their current status.
Windows 11 defragmentation tool turned off
windows 11 defragmention off

Each drive has a row with its name, Media type, the date it was last analyzed or optimized, and its current status. Check the Media type column first. A drive listed as a hard disk drive benefits from defragmentation. A drive listed as a solid state drive only needs TRIM, which Windows handles itself.

To run it by hand, select a hard drive and click Analyze. Windows reports a percentage of fragmentation. If the drive needs work, click Optimize and wait for the status to update. You can keep using the PC meanwhile, but it may feel slower until the job finishes. Defragmenting a large, full drive can take a long time.

If you want to set a specific time for this to run, make sure Schedule optimization is turned off by clicking Change settings. In the window that opens, the scheduling option is the checkbox labeled Run on a schedule (recommended) on current Windows 11 builds. Clear that checkbox and click OK. Changing this setting needs an administrator account, so approve the prompt if one appears.

Turning off Windows’ own schedule stops it from running at its default time. That way it doesn’t overlap with the custom time you set in the next section. To undo this, open Change settings again and tick the checkbox. No restart is needed.

How to Schedule Defragmentation

To schedule defragmentation in Windows 11, open the Task Scheduler app from the Start menu and set up a new task to run drive optimization automatically at your preferred time. Windows handles this in the background by default, but a custom schedule gives you full control over when the maintenance runs. For example, you can pick a time when you are never at the PC.

Rather than build a new task from scratch, the steps below change the trigger on the existing Defrag task that Windows already provides. Task Scheduler is included in all editions of Windows 11.

📝NoteThis process requires admin privileges.
Advertisement
  1. Search for Task Scheduler in the search bar and open the app.
Windows 11 Task Scheduler application window
windows 11 task scheduler app

The Task Scheduler window opens with a folder tree on the left, the task list in the middle and an Actions pane on the right. If it asks for permission, click Yes. If you are signed in with a standard account, enter an administrator password.

  1. In the menu on the left, go to Task Scheduler Library %📂%LNK0%% > Microsoft Windows Defrag.
Task Scheduler setup for defragmentation
task scheduler defrag

Click each folder in turn to open it. When you select the Defrag folder, its task appears in the middle pane, usually named ScheduledDefrag. Its status column normally reads Ready.

  1. Double-click the defrag schedule or click Properties on the right side.
Windows 11 defragment task schedule triggers
windows 11 defragment task schedule triggers

The task’s Properties window opens with several tabs, such as General, Triggers and Actions. If you used the right-hand pane, select the task first so the Properties link appears.

  1. Click the Triggers tab and click New to choose your preferred time and frequency.
Windows schedule for defragmentation triggers
windows schedule defrag triggers

A New Trigger window opens. Pick how often the task should run (for example daily, weekly or monthly), then set the start date and time. Choose a time when the PC will be on but you won’t be working. A desktop that is switched off at that time will simply skip the run unless you set the task to run as soon as possible after a missed start.

  1. Click OK to save your settings. Finally, right-click the task and select Enable to turn it on.
Enabling scheduled task for Windows 11 defrag
windows 11 enable schedule task defrag

The new trigger should now show in the list on the Triggers tab. If the right-click menu shows Disable instead of Enable, the task is already turned on and you don’t need to do anything more. To go back to the default behavior, delete your trigger on the Triggers tab and turn Windows’ own scheduling back on in Drive optimization. No restart is required.

Summary

Defragmenting your Windows 11 drive helps organize files, making your computer find them quicker and improving overall performance.

If your PC uses an SSD, leave it alone. Windows already keeps it optimized with TRIM. If you use a hard drive, the default weekly schedule is enough for most people, so check the Drive optimization window now and then to confirm the status reads OK.

Have a question about this guide?

Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.

Tags: #Windows 11

Did this guide fix your problem?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *