How to defragment your PC's hard drive on Windows 10

In order to minimize slow hard drive performance, Windows 10 (and so Windows 8.1, Windows 7, and previous versions), includes a built-in tool to defragment all fragmented files and help your PC stay at top speeds.

Over the years, improvements have been made to the Windows drive optimization tool. However, even when the operating system can accurately detect the type of storage and handle defragmentation of files automatically, it's not always optimal. Because you may not keep your PC turned on long enough or you may have an external hard drive that it's not always connected to your computer that prevents maintenance from running properly.

As a result, the time will come when you'll begin to notice that opening apps and saving files to disk will take longer than usual, in which case manual optimization may be required. In this Windows 10 guide, we'll show you the easy steps to check if your hard drive is fragmented and defragment as necessary to keep your computer running more efficiently.

How to use Optimize Drives on Windows 10

  1. Open Start type Defragment and Optimize Drives and press Enter.
  2. Select the hard drive you want to optimize and click Analyze.Note: You always want to analyze the drive first to figure out if the drive needs optimization. If the result shows less than 10% fragmented, you probably don't need to optimize the drive.
  3. If the files stored on your PC's hard drive are scattered everyone and defragmentation is needed, then click the Optimize button.

  1. Once the process complete, the current status should display "0% fragmented".

Note: Keep in mind that depending on the number of files, the size of the drive, and fragmentation, the defragmentation tool may take some time to complete the task. It's also recommended to perform this task when you know, you won't be around your computer.

How to change the optimization schedule

By default Windows automatically runs maintenance on drives every week, but depending on how you use your computer, the operating system offers the option to change the frequency in which drivers are optimize.

If you prefer to modify the schedule, then follow the steps below:

  1. While in the Optimize Drives window, click the Change settings button.
  2. Change the frequency to: Daily, Weekly (default), or Monthly.
  3. On Drives, click the Choose button.

  1. Check the drives you want to apply the new schedule.

  1. Click OK to apply the settings.
  2. Click OK.
  3. Click Close to quit the tool.

Remember that these optimization options only apply to traditional rotating platters hard drives. Solid-state drives work differently. They don't have any motors or moving parts. They only use banks of memory to store data, which means that these drives don't need to be defragmented (you shouldn't defragment SSDs, as it may cause performance issues and even reduce the life of the drive).

However, you'll still see "Solid state drive" listed under the Optimize Drives tool, because Windows can also perform different maintenance tasks to optimize your SSD, including the ability to inform the drive that certain blocks of data are no longer in use and can be erased making them writable again.

Although Windows 10 can detect and configure the appropriate optimization options for storage devices, if you have a traditional hard drive or an external drive that it's now always connected to your system, you should run maintenance on them manually.

More on Windows 10

For more help articles, coverage, and answers on Windows 10, you can visit the following resources:

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

39 Comments
  • There is no need for this. Defragmentation happens automatically and even when it doesn't fully complete its task in defragmenting because of your computer going to sleep/shut off, you won't notice any speed improvements. But if you want to or don't believe me, you can always try it yourself. That's the beauty of freedom. ;)
  • Basically, manually defrgamentinng a traditional hard disk drive has been an unnecessary task since Windows Vista.
  • Yep it is, but I don't blame this article for telling people how to do it manually. I just don't do it because I know it won't make any difference.
  • totally.  I would think that anyone that is that bothered by defragging manually would already know how, and those that never knew would never notice the difference when it runs when the computer is idle.   Ever walked away from the machine for 10 minutes and come back and the harddrive is chugging away?... its defragging.
  • You're a 100% right.
  • And adding to that: Been on ssd's since vista. Adding to that, these steps have been in windows since W95
  • To bad only w8 & above only do a complete defrag like defraggler
  • Useless...
  • "...option to change the frequency in which drivers are optimize." I can haz cheezburger now? Sent from Ultimate Toaster 2.0 Deluxe
  • http://mentalfloss.com/sites/default/legacy/wp-content/uploads/2007/04/n...
  • This used to be a need like 10 years ago....not anymore......Let me go power up my C2D 6400 and 250G HDD from way back then......when it was necessary......
  • This article is so 1997.
  • As has been mentioned, this is totally redundant advice in this era of computing. In fact I've always argued that it was redundant back in the days of Windows 2000 and XP as the amount of time spent running a full disk defrag was way more than the amount of time you gain back in OS speed afterwards but hey, every nanosecond counts! Also, please do not run a disk defrag on an SSD unless you want that SSD to die!!! Thankfully the tool built-in to Windows 10 won't defrag an SSD but some third party utilities will. tl;dr IGNORE THIS ARTICLE AND CARRY ON WITH LIFE
  • The thing with SSDs is exactly why this article should have never been published.
  • Please put the SSD warning at the top. Also Windows 10 appears to run the automatically so no need to manually do.
  • You haven't needed to defrag a Hard Disk since Vista as already mentioned
  • I use Iobit Smart Defrag
  • FWIW, the actual process of writing to electro-mechanical hard drives in Windows hasn't changed much for decades, so yeah, if you needed to defrag in win98, you need to defrag in 10, unless of course you've got an SSD -- in fact, you have more need than before if you upgrade builds in 10, which because of the way it saves your old version of Windows + software, leaves files *way out there* so-to-speak if you remove those old & installation files. For example, after upgrading builds in a win10 VM the dynamic VHD will be from 25-30GB -- after a defrag + compact it'll be ~11GB, & compacting without defragging 1st makes almost no difference, because there are files close to the far end of the disk. If you're after saving space, moving all the files towards the start of the disk, you'll do better defragging the system disk/partition while running another copy of Windows or *nix -- files that Windows is using cannot be moved. If you're running 10, stuff like defrag & error checking *may* not work as fast if performed in win7 on the win10 disk/partition, so try to use 10 with win10 disks/partitions if possible. There's nothing wrong with using another brand of defrag software, e.g. Yahia using Iobit. Data stored on a circular disc or platter can be read faster at one end than the other, so most defrag apps try to put the stuff you use most at the fastest part of the drive/partition. Determining what you use the most is the hard part, & Iobit will probably do that a bit differently than say Auslogics, so mileage can vary. The author, Mauro, also mentions optimizing SSDs, for example win10 telling the SSD that storage is no longer in use... Overwriting data on a regular hard drive is the same as writing data to free space, but requires two steps on a SSD, one to delete, & one to write. Clearing that data beforehand obviously makes writing to that same storage location faster. \
  • None of this is true. Not one bit. Posted from PornHub
  • "so yeah, if you needed to defrag in win98, you need to defrag in 10" Because those two OSes are so much alike!    We've all switched from MS-DOS since 2001, rules that might have applied to Win9x(and FAT32) don't apply to current storage formats(NTFS/ReFS)   "If you're after saving space" Defragmenting to save space, WTF?       "Data stored on a circular disc or platter can be read faster at one end than the other" That might have been true in the 90s, HDDs run fast enough RPMs so that it makes little to no difference whatsoever.
  • This is still my go to article for disk defragging. I'm not sure if it works on SSD's!  https://web.archive.org/web/20060207032247/http://www.datadocktorn.nu/us_frag1.php​ (Thank goodness for the Web Archive)      
  • You never defrag an SSD, for the reasons mentioned in the article. The biggest reason is that it can reduce the life of the drive
  • The article is a spoof guide. A bit of silly fun from way back when... (and no one had SSD's!)
  • Lol some mini usb HDDs back in the fay were marketed as flash drives
  • welcome to 2005   :/
  • Automated for years. Posted via the Windows Central App for Android
  • Good article & comments.
  • I thought I woke up in 1995 again.
  • I've never defragmented since the1990s and had forgotten all about it. I think it's automatic nowadays.
  • Simple, just use a SSD.
  • Use Smart Defrag By Iobit .More easy and best tool in market to defrag
  • It is my experience that defraggler does a better defragmentation job than windows' native defragmentation software.
  • Articles like these make me want to uninstall this app on my phone.
  • Why this article?
    Are we in 2016?
  • I think that installing Windows insider builds frequently can damage your HDD. Also asked frequent cut copy and paste from HDD.
  • If you want to do your ssd some good, use cleanmgr every now and then to reduce the amount of clutter (especially system files).
  • Open Windows Explorer. Right Click on C:\, selection Properties...Tools. Click on the Defrag option. There may be better tools available, but I would guess that this does a more then adequate job, especially for the price.
  • Hi -  Sort of a weird question here.  What if someone has an old laptop that they only turn on to do a few tasks and then shuts it off.  How would a scheduled defrag ever happen?  I have seen a few computers lately have have not been defragged for a couple of years and they are on Windows 7.  Please enlighten me.
  • I encountered a PC never defragged (and older windows). Barely started and very slow after. Used some free defrag prog and after it ran smoothly.