Geeks in Phoenix

Geek Blog

How to defragment and optimize your drive in Windows 10

Updated August 17, 2020

Have you ever tried to find a file in a disorganized filing cabinet? It can take some time. The same thing can happen when your computer's drive becomes fragmented. But you can keep all of the folders and files on your computer organized with regular defragmentation. Here's how to defragment and optimize your drive in Windows 10.

How to defragment and optimize your drive in Windows 10

There are two (2) types of drives used in computers, Hard Disk Drive (HDD) and Solid State Drive (SSD). The kind of drive you have determines whether you need (or want) to defragment and optimize it. To find out what type of drive(s) you have, follow the standard instructions below. The Optimize Drives screen will tell you what kind of drive(s) you currently have in your computer.

The issue of drive fragmentation stemmed from the early '80s when Microsoft needed an OS, and they bought Quick and Dirty Operating System (QDOS) and renamed it MS-DOS. At that time, HDDs were the only type of drive available, and they are still the de facto standard in the industry. And they do need to be defragmented and optimized regularly.

Now SSD's are different in that there are no moving parts inside, just memory chips. So when your computer reads and writes to it, the data is going back to the same location on the drive. You can defrag and optimize an SSD, but it is not recommended since SSDs have limited read/write cycles, and any program that intensively accesses the SSD could shorten the life span of the drive. Microsoft started adding support for SSDs in Windows 7 / Windows Server 2008 with the Trim command. Since the low-level operation of SSDs differs from HDDs, the Trim command handles deletes/format requests.

You can verify Trim is enabled by typing the following into an Administrative Command Prompt:

fsutil behavior query DisableDeleteNotify

If the command returns a 0, then Trim is enabled. If it returns a 1, then it is not. To enable Trim, type the following into the Administrative Command Prompt:

fsutil behavior set DisableDeleteNotify 0

Standard drive defragment and optimization in Windows 10

standard drive defragment and optimization in Windows 10

  1. Bring up the Defragment and Optimize Drives application by:
    1. Left-click on the Start Windows logo button.
    2. Scroll down to Windows Administrative Tools and left-click to expand.
    3. Left-click on Defragment and Optimize Drives.


    1. Open File Explorer by left-clicking the File Explorer icon (the manilla folder) on the Taskbar.
    2. In the left-side column, left-click on This PC.
    3. In the right-side column right-click on the drive you want to check and select Properties.
    4. Left-click on the Tools tab.
    5. Under Optimize and defragment drive left-click on Optimize.


  2. Left-click on the drive(s) you want to optimize.
  3. Left-click on Analyze (Analyze all) or Optimize (Optimize all)

Advanced drive defragment and optimization in Windows 10

advanced drive defragment and optimization in Windows 10

  1. Open a Command Prompt with Administrative privileges (click here for instructions)
  2. Use the following command line syntax(s) and parameter(s) to run DEFRAG:

defrag <volumes> | /C | /E <volumes> [<task(s)>] [/H] [/M [n] | [/U] [/V]] [/I n]
Where <task(s)> is omitted (traditional defrag), or as follows: /A | [/D] [/K] [/L] | /O | /X
Or, to track an operation already in progress on a volume: defrag <volume> /T

defrag C: /U /V
defrag C: D: /M
defrag C:\mountpoint /A /U
defrag /C /H /V

Value Description
/A Perform analysis on the specified volumes.
/C Perform the operation on all volumes.
/D Perform traditional defrag (this is the default).
/E Perform the operation on all volumes except those specified.
/H Run the operation at normal priority (default is low).
/I n Tier optimization would run for at most n seconds on each volume.
/K Perform slab consolidation on the specified volumes.
/L Perform retrim on the specified volumes.
/M n Run the operation on each volume in parallel in the background. At most n threads optimize the storage tiers in parallel.
/O Perform the proper optimization for each media type.
/T Track an operation already in progress on the specified volume.
/U Print the progress of the operation on the screen.
/V Print verbose output containing the fragmentation statistics.
/X Perform free space consolidation on the specified volumes.

Free computer diagnostics

Repairing a PC can sometimes be expensive. That is why we offer free basic in-shop diagnostics. Give one of our professional and experienced technicians a call at (602) 795-1111, and let's see what we can do for you.

Check out our reviews

Geeks In Phoenix LLC, BBB Business Review

Customer service is #1

Here at Geeks in Phoenix, we take pride in providing excellent customer service. We aim to give the highest quality of service  from computer repair, virus removal, and data recovery.

Bring your computer to us and save

Repairing a computer can be time-consuming. That is why we base our in-shop service on the time we work on your computer, not the time it takes for your computer to work! From running memory checking software to scanning for viruses, these are processes that can take some time.

Contact us

Geeks in Phoenix
Professional service at an affordable price!
4722 East Monte Vista Road
Phoenix, Arizona 85008
(602) 795-1111

Like Geeks in Phoenix on Facebook

Follow Geeks in Phoenix on Twitter

Watch Geeks in Phoenix on YouTube

Geeks in Phoenix is an IT consulting company specializing in servicing laptop and desktop computers. Since 2008, our expert and knowledgeable technicians have provided excellent computer repair, virus removal, data recovery, photo manipulation, and website support to the greater Phoenix metro area.

At Geeks in Phoenix, we have the most outstanding computer consultants that provide the highest exceptional service in Phoenix, Paradise Valley, Scottsdale, and Tempe, Arizona. We offer in-shop, on-site, and remote (with stable Internet connection) computer support and services.

Copyright © 2021 Geeks in Phoenix LLC