How to Defragment Windows 11 for Better Performance
- 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.
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.
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.
- Open the Settings app by pressing Win+I or by clicking Start and selecting 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.
- Click on System, then select Storage on the right side of the screen.

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.
- Click on 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.
- Select Drive optimization from the menu.

The Optimize Drives window opens. This is the classic Windows disk tool, and it opens in its own window on top of Settings.
- Look at the list of your drives and their current status.

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.
- Search for Task Scheduler in the search bar and open the 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.
- In the menu on the left, go to Task Scheduler Library %📂%LNK0%% > Microsoft Windows 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.
- Double-click the defrag schedule or click Properties on the right side.

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.
- Click the Triggers tab and click New to choose your preferred time and frequency.

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.
- Click OK to save your settings. Finally, right-click the task and select Enable to turn it on.

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.
Did this guide fix your problem?
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.
No comments yet — be the first to share your thoughts!