How to Disable Automatic Defragmentation in Windows 10

Last update: 04/10/2024
How to Disable Automatic Defragmentation in Windows 10

Would you like to learn how to disable the automatic defragmentation in Windows 10? Defragmentation is a task that must be performed on a conventional hard drive (HDD) to optimize its performance by preventing files from being scattered on the hard drive and lengthening its lifespan. There access to files.

Of course, the situation is different with a hard drive. SSD which works differently than a traditional hard drive. Therefore, defragmenting an SSD drive is useless or even counterproductive, which is why Windows 10 does not perform SSD defragmentation, but performs SSD optimization via the TRIM command.

In this article we will explain how to disable automatic defragmentation in Windows 10 with different methods through Windows 10 settings, through the task scheduler or using the symbol of the system of Windows 10. Because this automatic defragmentation can annoy you in some cases, especially if it causes slowdowns while playing a video game.

Here you can read about: How to Recover Deleted Files on Windows PC and Hard Drives for Free

Why disable automatic defragmentation in Windows 10?

Defragmentation is a recommended practice for optimizing Windows if the operating system is installed on a normal hard drive. In fact, the goal of defragmentation is, broadly speaking, to gather file fragments into contiguous sectors to avoid increasing file access time.

Defragmentation provides faster access to files. That's why in Windows 10, Microsoft has provided a weekly automatic defragmentation which is now called Disk Optimization.

However automatic defragmentation It can sometimes be annoying if you are playing a video game, for example, because it can cause severe slowdowns in your game, so we will see how to activate, deactivate or reactivate automatic defragmentation in Windows 10.

Disable automatic defragmentation in Windows 10 via system settings

First solution, very accessible to all users, even the most novice ones: disable automatic defragmentation in Windows 10. Here we will disable the task of optimizing a backup hard drive (HDD). Here is how you should do it:

  1. Step 1:: Open the Windows 10 file explorer (using, for example, one of the keyboard shortcuts For Windows, here: Windows key + E). Right-click on your hard drive and click Properties.
Click Properties.
Click Properties.
  1. Step 2:: Without fear if your Windows explorer is not on a black background, use the dark mode Windows 10
  2. Step 3:: In your hard drive's properties window, click the tab Tools and then on the button Optimize.
Click the Tools tab and then the Optimize button
Click the Tools tab and then the Optimize button
  1. Step 4:: Check the optimization status of your hard drive: it is carefully or says Needs to be optimized.
  2. Step 5:: Click the button Optimize if necessary! Windows then takes care of defragmenting your hard drive. If you want to disable scheduled optimization of your hard drive, click the button Change settings.
Click the Change Settings button
Click the Change Settings button
  1. Step 6:: All you have to do is uncheck the box Scheduled execution and then click the button Accept to validate your choice.
  How to Fix Devices Connected to the System Not Working
Click the OK button 
Click the OK button

As said before, the optimization program is useful for your PC's performance, so we advise you to disable it only if you have problems related to defragmentation (if you play at night, for example, when the defragmentation task runs). Of course, all you have to do is check the scheduled execution box to restore this optimization task.

  • NOTE: Instead of going through Windows File Explorer, it is also possible to launch the Windows Defragmentation tool directly using the function Run(accessible by right-clicking on the Windows 10 Start menu or using the Windows + R keyboard shortcut) with the command dfrgui

Disable Automatic Defragmentation Scheduled Task in Windows 10

Therefore, Microsoft has planned to automatically launch defragmentation of hard drives every week. To do this, it uses the Task Scheduler that allows you to run defined tasks at scheduled intervals. Therefore, it is possible to disable scheduled automatic defragmentation tasks in Windows 10 using the Task Scheduler. Therefore, you need to do the following:

  1. Step 1:: Open the scheduler with the keyboard shortcut Windows + R (or by right-clicking on the Start menu and then clicking Run) and then write taskschd . msc
  2. Step 2: In the Task Scheduler left pane explorer, navigate as follows: Task Scheduler Library after Microsoft after Windows after Defrag
  3. Step 3: Right click on the task ScheduledDefrag and then click Disable
ScheduledDefrag
ScheduledDefrag

Stop Automatic Defragmentation in Windows 10 via Command Prompt

Last method in favor for those who are not afraid of the command prompt. Here is how to disable scheduled hard drive defragmentation from the command line. commands:

  1. Step 1:: Right-click on the Windows 10 Start menu and select Command Prompt (Administrator) If you don't see this tool, check out my article on Windows 10 Command Prompt Not Found.
  2. Step 2:: Type in the command prompt: schtasks /Change /DISABLE /TN «\Microsoft\Windows\Defrag\ScheduledDefrag» and then press Enter
  What Is An MTL File? What Is It For And How To Open One
schtasks /Change /DISABLE /TN "\Microsoft\Windows\Defrag\ScheduledDefrag
schtasks /Change /DISABLE /TN «\Microsoft\Windows\Defrag\ScheduledDefrag

And here is the command to re-enable scheduled hard drive defragmentation:

schtasks /Change /ENABLE /TN «\Microsoft\Windows\Defrag\ScheduledDefrag»

Another way to disable automatic defragmentation in Windows 10

Windows 10 does not automatically disable defragmentation when there is an SSD, so we show you this method to disable automatic defragmentation in Windows 10:

  1. Step 1:: Go to the computer, then right click on the local disk C and later Properties.
Properties
Properties
  1. Step 2:: Click in Tools => Optimize
Tools => Optimize
Tools => Optimize
  1. Step 3:: Click Modify parameters, uncheck the box Scheduled execution and then Accept to validate

Modify parameters, Modify parameters,

And now defragmentation is disabled.

Disable automatic defragmentation in Windows 10 on disks or SSDs

Windows 10 includes a disk and SSD defragmenter to optimize the latter. It is automatically activated at regular intervals or when the computer enters sleep mode.

This is the result that a dfrgui . exe process open and use the disk during defragmentation. You are looking to disable this Windows defragmentation for different reasons.

For example, you have purchased an SSD and you don't want Windows 10 to optimize it. This part of the article will teach you how to Remove and disable automatic defragmentation in Windows 10.

Solution 1: Disable automatic defragmentation in Windows 10 from Optimize and Defragment Disk

This is the procedure for disable the programming automatic for a particular player.

Time required: 10 minutes.

How to disable disk or SSD defragmentation in Windows 10

  1. Step 1: Open disk properties. Open File Explorer. Then click on this computer. On the drive where defragmentation is disabled, right click and after Properties.
right click and then Properties.
right click and then Properties.
  1. Step 2:: On any drive letter, right click and then click properties.
  2. Step 3:: Then click on the tab Tools and then on the button Optimize.
Optimize button.
Optimize button.

Change settings to optimize drives

  1. Step 1:: In the new window at the bottom right, click the button Change settings
Change settings
Change settings

Disable optimization program

The new window allows you disable optimization program.

  1. Step 1:: Simply Uncheck Scheduled Execution.

This disables automatic defragmentation for all drives.

Uncheck Scheduled Execution
Uncheck Scheduled Execution

Choose drives to defragment

  1. Step 1:: If you want to choose the disks and drives to defragment, click Choosing.
  2. Step 2:: Then uncheck the drives that will not be optimized.
Click on Choose
Click on Choose

You have successfully disabled automatic defragmentation in Windows 10 on your disks or SSD.

Solution 2: Disable Automatic Defragmentation in Windows 10 from Command Prompt

Here is another method via a CDM command that completely disables disk defragmentation and optimization. This removes the scheduled task that triggers defragmentation.

  1. Step 1:: Open Command Prompt as Administrator
  2. Step 2:: Copy/paste this schtasks command
  PowerShell secure remoting with Just‑Enough‑Administration (JEA)

schtasks /DISABLE /TN «\Microsoft\Windows\Defrag\ScheduledDefrag» /F

  1. Step 3:: Finally, if you want to re-enable it, use the following command with /ENABLE:

schtasks /Change /DISABLE /TN «\Microsoft\Windows\Defrag\ScheduledDefrag»

You have successfully disabled automatic defragmentation of your disk or SSD in Windows 10.

Solution 3: Disable Automatic Defragmentation in Windows 10 from Disabling Scheduled Tasks

Another approach to disable defragmentation is to disable the scheduled task. The scheduled task will no longer be activated and thus the automatic defragmentation program will be stopped.

  1. Step 1:: On your keyboard, press the + R key
  2. Step 2:: Then enter the command: taskschd . msc
  3. Step 3: Task Scheduler Left Dropdown > Task Scheduler Library > Microsoft > Windows > Defragment
  4. Step 4: Right click on ScheduledDefrag and disable.
ScheduledDefrag and disable
ScheduledDefrag and disable

You have successfully disabled automatic defragmentation of your disk or SSD in Windows 10.

Solution 4: Disable Automatic Defragmentation in Windows 10 with Autoruns

Autoruns is a free utility that allows you to disable programs that run at startup, manage scheduled tasks, etc. You can also disable scheduled task with Autorun program:

  1. Step 1:: Download the Autoruns program (FROM THIS LINK)
  2. Step 2:: Unzip the ZIP file to the desktop
  3. Step 3:: Launch Autoruns by right clicking and then run as administrator
  4. Step 4:: In the Tools menu, uncheck “Hide Microsoft entries"
  5. Step 5:: Repeat for “Hide Windows Entries"
  6. Step 6:: Finally, do a search in Defrag and then uncheck the scheduled tasks in the Task Scheduler section.
Hide Windows Entries
Hide Windows Entries

You may also be interested in reading about: Fix Error Star Citizen Crashes On Windows

You have successfully disabled the defragmentation automatic backup of your disk or SSD in Windows 10.

Conclusion

As you can see, these are the best methods you can use to disable automatic defragmentation in Windows 10. Each of these ways will help you get rid of the slowdown in your games, but we advise you to re-enable it to keep your PC or laptop optimized. We hope we have helped you with this information.