Recommended Free Tools
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Windows 11 already includes the right tool for routine drive maintenance. Its Defragment and Optimize Drives utility selects an operation based on the storage Windows detects: it traditionally defragments HDDs, while an SSD—including a typical internal NVMe SSD—is normally optimized with TRIM (also called retrim). Leave scheduled optimization enabled unless you have a specific troubleshooting or policy reason to change it; avoid repeatedly forcing traditional defragmentation on an SSD.
Defragmentation, optimization and TRIM are different operations
The word “defragment” in the Windows utility’s name is historical shorthand, not a promise that every drive gets HDD-style file rearrangement. These operations serve different purposes:
| Operation | Typical use | What it does |
|---|---|---|
| Traditional defragmentation | HDDs | Rearranges file fragments to reduce the movement of the drive’s read/write head. |
| TRIM or retrim | SSDs, including many NVMe SSDs | Tells the drive which storage ranges are no longer in use, so it can manage those blocks internally. |
| Slab consolidation | Some virtualized or pooled storage | Reorganizes allocated storage slabs; whether it applies depends on the storage configuration. |
| Secure erase | Compatible SSDs, using a vendor-supported method | Destructively sanitizes data. It is not routine optimization and can make data unrecoverable. |
When files are deleted, TRIM can communicate that their former storage ranges are no longer needed. The SSD may then prepare those blocks as part of its internal garbage collection. TRIM does not move fragmented files into contiguous physical locations, securely erase deleted data, recover files, repair failing hardware, or guarantee a visible speed increase. Microsoft describes retrim as sending TRIM and Unmap hints for unused sectors to the underlying storage.
NVMe describes a storage protocol and interface; it is not a separate maintenance command. Windows’ choice depends on the media and storage stack it detects. A typical internal NVMe drive is identified as an SSD, but an external enclosure, RAID layer, Storage Spaces pool or virtual disk can affect which capabilities Windows sees.
#1 Best Overall
- MEET THE NEXT GEN: Consider this a cheat code; Our Samsung 990 PRO Gen4 SSD helps you reach near max performance with lightning-fast speeds; Whether you’re a hardcore gamer or a tech guru, you’ll get power efficiency built for the final boss
- REACH THE NEXT LEVEL: Gen4 steps up with faster transfer speeds and high-performance bandwidth; With a more than 55% improvement in random performance compared to 980 PRO, it’s here for heavy computing and faster loading
- THE FASTEST SSD FROM THE WORLD'S FLASH MEMORY BRAND: The speed you need for any occasion; With read and write speeds up to 7450/6900 MB/s you’ll reach near max performance of PCIe 4.0 powering through for any use
- PLAY WITHOUT LIMITS: Give yourself some space with storage capacities from 1TB to 4TB; Sync all your saves and reign supreme in gaming, video editing, data analysis and more
- IT’S A POWER MOVE: Save the power for your performance; Get power efficiency all while experiencing up to 50% improved performance per watt over the 980 PRO; It makes every move more effective with less consumption
Use Windows 11’s built-in optimizer
For a normal internal HDD, SATA SSD or NVMe SSD, start with Windows’ built-in utility rather than installing a third-party defragmenter. The GUI is called Defragment and Optimize Drives; defrag.exe is its command-line counterpart, and PowerShell provides the Optimize-Volume cmdlet. Microsoft’s PowerShell documentation says the default operation for an SSD with TRIM support is -ReTrim, while HDDs receive analysis and defragmentation.
To run it manually:
- Open Start or taskbar search and type defrag.
- Select Defragment and Optimize Drives.
- Select the volume you want to check. Review its Media type, Current status and Last run.
- Select Optimize.
On an HDD, Optimize means traditional defragmentation. On an SSD or NVMe SSD with TRIM support, it normally runs an SSD-appropriate operation such as retrim. The interface may not spell out every underlying action, so do not infer that an SSD is being treated like an HDD just because the button or utility mentions defragmentation.
Windows enables scheduled optimization by default; Microsoft’s support instructions describe a weekly schedule. For most users, leave it enabled. Microsoft’s defrag command documentation also describes occasional scheduled traditional optimization of an SSD under certain conditions, as well as retrim. That is part of Windows’ maintenance behavior—not a reason to repeatedly run an HDD-oriented defragmenter against an SSD.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsChange the schedule only if you have a reason
In Defragment and Optimize Drives, select Change Settings under Scheduled optimization. Choose Daily, Weekly or Monthly, or disable the schedule; select which drives are included. If Windows offers the option to increase schedule frequency after missed runs, you can enable it. Changing the general schedule does not mean every SSD receives traditional defragmentation at that same interval: Windows applies media-specific rules.
Rank #2
- PCIe 4.0 Performance: Delivers up to 7,100 MB/s read and 6,000 MB/s write speeds for quicker game load times, bootups, and smooth multitasking
- Spacious 1TB SSD: Provides space for AAA games, apps, and media with standard Gen4 NVMe performance for casual gamers and home users
- Broad Compatibility: Works seamlessly with laptops, desktops, and select gaming consoles including ROG Ally X, Lenovo Legion Go, and AYANEO Kun. Also backward compatible with PCIe Gen3 systems for flexible upgrades
- Better Productivity: Up to 2x faster than previous Gen3 generation. Improve performance for real world tasks like booting Windows, starting applications like Adobe Photoshop and Illustrator, and working in applications like Microsoft Excel and PowerPoint
- Trusted Micron Quality: Built with advanced G8 NAND and thermal control for reliable Gen4 performance trusted by gamers and home users
Disabling the schedule is not the usual solution for an SSD. Change it only for a specific troubleshooting test, unusual storage setup or policy requirement. Scheduled maintenance may not run when the computer cannot wake, is unplugged or on battery, or has resumed from idle, so an old Last run date alone does not prove a problem.
Command-line options for analysis or retrim
Use commands only if you are comfortable identifying the correct volume. Replace C: or C with the drive letter you intend to work on. Open an elevated Command Prompt or PowerShell window where administrator permissions are required.
To analyze a volume without optimizing it, use Command Prompt:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchdefrag C: /a /u /v
/a analyzes, /u displays progress and /v provides verbose statistics. In PowerShell, the equivalent analysis-oriented approach is:
Rank #3
- SPEED UP PROJECTS. Launch creator applications fast with uncompromising PCIe 4.0 read speeds up to 7,100MB/s,[2] (1TB and 2TB[1] models) and write speeds up to 6,700MB/s[2] (1TB[1]-4TB[1] models).
- CREATE AND STORE MORE. Make more room for your 4K videos and high-resolution images with capacities from 500GB[1] up to 4TB[1] on M.2 2280 built with our trusted 8th generation SANDISK BiCS QLC 3D CBA NAND.
- IT GOES WHERE YOU GO. With an all-new power efficient design, your drive delivers high performance with low power, giving you more time to be productive while on the go.
- UNCOMPROMISED RELIABILITY. With up to 1,200 TBW[3] (4TB[1] model) endurance rating, your drive is designed for creators.
- KEEP YOUR DRIVE UPDATED. Monitor your SSD’s performance and check for updates with the downloadable SANDISK Dashboard application.[5]
Optimize-Volume -DriveLetter C -Analyze -Verbose
To request retrim for an SSD volume, use either:
defrag C: /l /u /v
Optimize-Volume -DriveLetter C -ReTrim -Verbose
To ask Windows to perform the appropriate optimization for the detected media, use:
defrag C: /o /u /v
Or let the PowerShell cmdlet select its documented default operation:
Optimize-Volume -DriveLetter C -Verbose
Microsoft documents media-dependent behavior for Optimize-Volume: an HDD, fixed VHD or Storage Space may be analyzed and defragmented; an SSD with TRIM support is retrimmed; some thin-provisioned or virtual-storage configurations can use retrim or slab consolidation. Unsupported or unknown media may receive no operation. Do not substitute defrag C: /d as a blanket SSD command: /d requests traditional defragmentation, whereas /o asks Windows to choose the appropriate optimization for the media.
In a scripted or unfamiliar setup, PowerShell’s -WhatIf can show what an operation would do without performing it, for example:
Rank #4
- This product has been replaced by our latest generation. Please search for the SANDISK Optimus GX 7100 NVMe SSD
- HIGH-OCTANE GAMING. Experience speeds up to 7,250MB/s read and 6,900MB/s write (1-2TB models), with up to 35% faster performance than previous generation.
- PURPOSE-BUILT. Designed for serious on-the-go gamers, with a PCIe Gen4 interface and SANDISK’s next generation TLC 3D NAND.
- MORE TIME TO CLEAR THAT CHECKPOINT. Built with laptops and handheld gaming devices in mind, with up to 100% more power efficiency over the previous generation.
- DO MORE WITH DASHBOARD. Ensure your drive is optimized for prime performance with the downloadable WD_BLACK Dashboard (Windows only).
Optimize-Volume -DriveLetter C -ReTrim -WhatIf
Check the command’s output and make sure the drive letter is correct before running a change. Not every storage type supports every operation.
Is traditional defragmentation harmful to an SSD?
Traditional defragmentation moves file data, creating writes that usually do not provide an SSD the seek-time benefit they provide an HDD. That is why you should not repeatedly force HDD-style defragmentation on an SSD simply because a utility reports fragmentation. But an isolated run is not evidence that the SSD has been damaged; the concern is unnecessary repeated write activity, not that one accidental operation will immediately destroy the drive. Windows’ built-in maintenance is media-aware, so it is not equivalent to blindly running a third-party tool that cannot distinguish SSD optimization from traditional defragmentation.
For a typical PC, the practical choice is simple: use Optimize Drives for routine checks and let Windows handle its schedule. Consider command-line retrim only when you have a reason to run it manually, such as troubleshooting. A fragmentation percentage by itself is not a good reason to force HDD-style optimization on an SSD.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When a manufacturer utility is useful
A drive maker’s utility is not required for ordinary Windows TRIM or routine optimization. It can be useful for firmware updates, drive-health and temperature information, diagnostics, model-specific performance or power features, over-provisioning, and supported secure-erase functions. Back up important data before firmware updates or destructive operations; a secure erase is not a maintenance shortcut.
Best Value
- Ideal for high speed, low power storage
- Gen 4x4 NVMe PCle performance
- Up to 6,000MB/s read, 4,000MB/s write
- Includes Acronis cloning software
- 5-year limited warranty
- Samsung Magician is intended for Samsung-branded storage products. Features vary by model, and Samsung notes that some drives or controller paths may not be supported.
- Crucial Storage Executive is a free management utility for compatible Crucial drives. Available features depend on the drive model.
If you install vendor software, get it from the manufacturer’s official support or download page. Do not install a paid “SSD defrag” product just to enable TRIM; Windows already provides routine optimization.
Special cases and troubleshooting
Windows shows an unexpected media type
Confirm which disk contains the selected volume in Settings > System > Storage > Advanced storage settings > Disks & volumes, or open Disk Management. Microsoft’s Disk Management overview explains how Windows presents disks and volumes. If the drive is behind RAID, Storage Spaces, a virtual-disk layer or a USB enclosure, Windows may be seeing an abstraction rather than the physical device. Do not casually change the storage-controller mode in BIOS on an existing Windows installation; doing so can prevent Windows from booting.
An external SSD does not retrim or is not recognized as expected
TRIM pass-through depends on the USB-to-SATA or USB-to-NVMe bridge, enclosure firmware, controller mode and Windows support. An external drive is not guaranteed to accept retrim simply because an internal SSD would. Check the enclosure and drive manufacturer’s documentation before assuming the SSD itself is faulty.
Optimize is unavailable, fails or the last run is old
- Make sure the intended volume is selected and is online and mounted.
- Close applications doing heavy disk work, then try again.
- Use
defrag C: /a /u /vorOptimize-Volume -DriveLetter C -Analyze -Verboseto gather status or an error before changing anything. - If appropriate, retry from an elevated Command Prompt or PowerShell window.
- Consider whether RAID, Storage Spaces, encryption, virtualization or an external enclosure is affecting what Windows can optimize.
- If errors persist, back up important files and investigate the drive’s health, cable or enclosure, controller drivers and the manufacturer’s diagnostics.
Do not format a volume, run secure erase or change BIOS storage mode as a routine optimization fix. If the drive reports a health warning, prioritize a backup and diagnosis over defragmentation.
The SSD is nearly full or still feels slow
Optimization is not a substitute for free space, a healthy drive or correct hardware configuration. Remove temporary files, uninstall unused applications, move large files or expand the volume if appropriate. There is no universal free-space percentage that fits every drive and workload. TRIM will not fix worn NAND, a failing controller, thermal throttling or a PCIe link running at the wrong generation or lane width; it also cannot replace backups or recover deleted files.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

