The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
If “defrag” is not working, use Windows’ built-in Defragment and Optimize Drives utility. Open taskbar Search, type defrag, select the matching app, choose a drive, and click Analyze or Optimize. Analyze first on a hard disk drive (HDD) when you want to check its condition. Windows traditionally defragments HDDs, but it uses TRIM-style optimization for solid-state drives (SSDs). If the operation fails, the usual causes are insufficient free space, a volume marked dirty, an unsupported or locked volume, or another defrag operation already running.
What does “defrag computer” mean in modern Windows?
“Defrag computer” usually means optimizing a storage drive with Windows’ Defragment and Optimize Drives tool. The name is slightly misleading because Windows does not use the same operation for every type of drive.
As an Amazon Associate I earn from qualifying purchases.
On an HDD, files can become divided into fragments stored in different physical locations. Traditional defragmentation reorganizes those fragments so the drive can read the data in a more orderly way. On an SSD, Windows uses a TRIM-style operation instead. TRIM tells the SSD which blocks can safely be prepared for future writes; it is not the same as repeatedly rearranging files on a mechanical disk.
The built-in Windows utility is normally all you need. You do not need to buy a separate defragmenter or replace hardware simply because the app says a drive needs optimization.
Popular on Amazon
- Spacious Design: Measuring 21.1" wide and 14.1" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
- Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy ergonomic support with the integrated cushioned wrist rest.
- Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
- Durable Surface: Work with confidence on our lap desk's solid surface, featuring a sleek black carbon color, ensuring optimal air circulation to prevent your laptop from overheating.
- On-the-Go Convenience: With an integrated handle and lightweight design (2.8 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
How do I open Defragment and Optimize Drives?
- Open the Windows taskbar Search box.
- Type
defrag. - Select Defragment and Optimize Drives from the results.
- In the drive list, select the volume you want to check.
The app identifies the available volumes and presents an action for the selected drive. Select the correct volume before starting; optimizing the wrong partition will not repair a different drive.
How do I defragment an HDD?
For a mechanical hard disk, check its state with Analyze and then optimize it when Windows indicates that optimization is appropriate.
Recommended Free Tools
- In Defragment and Optimize Drives, select the HDD.
- Click Analyze. Wait for the status to update.
- If the drive needs work, click Optimize.
- Allow the operation to finish. Large or heavily fragmented volumes can take longer than lightly used ones.
Analyze is a check, not a repair. Optimize is the action that performs the media-appropriate maintenance after the check. If the buttons are unavailable or the operation stops, work through the blockers below rather than repeatedly clicking Optimize.
Should I defrag an SSD?
Do not treat an SSD like an HDD. Select the SSD in the same Windows utility and use Optimize; Windows chooses the appropriate SSD maintenance, which Microsoft describes as trimming.
TRIM tells the drive where cleanup can safely occur when it is not busy handling more important reads and writes. You should not schedule repeated manual, traditional defragmentation of an SSD. Leave Windows to apply the method it associates with that media type.
| Drive type | Windows operation | Your normal action | Main check when it fails |
|---|---|---|---|
| HDD | Traditional defragmentation | Analyze, then Optimize when appropriate | Free space, volume health, supported filesystem and locks |
| SSD | TRIM/retrim or another media-appropriate optimization | Use the built-in Optimize action | Confirm Windows recognizes the drive and allow scheduled optimization |
How do I run the Windows defrag command?
Use an elevated Command Prompt when the graphical app is unavailable or when you need a detailed report. The commands require local administrator-level rights.
Free tools Windows power users keep installed
One-click scans. No signup required.
Analyze a drive and display a report
- Open Start Search and type
Command Prompt. - Choose Run as administrator.
- At the prompt, enter:
defrag C: /a /u /v
This analyzes drive C, shows progress, and displays verbose statistics. Replace C: with the drive letter you actually want to inspect.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Apply the correct optimization
From the same administrator Command Prompt, run:
defrag C: /o /u /v
The /o option asks Windows to apply the proper optimization for the detected media type. The progress and verbose switches let you see what Windows is doing and the resulting statistics.
Do not run both interfaces on the same volume
The graphical Disk Defragmenter and the defrag command are mutually exclusive on a volume. Close the graphical operation before starting the command, and do not launch the GUI while the command is still running.
Why will defrag not run?
A failed or incomplete operation usually has a specific storage condition behind it. Check these causes in order.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteThe drive has less than 15% free space
Microsoft states that a volume needs at least 15% free space for defragmentation to complete adequately. With less available space, Windows may only perform part of the operation or stop before finishing.
- Open File Explorer and check the selected drive’s free-space indicator.
- Delete files you no longer need, or move large personal files to another location.
- Empty the Recycle Bin if it contains large items.
- Return to Defragment and Optimize Drives after creating enough working space.
Do not confuse free space on the Windows system drive with free space on the target volume. The volume being optimized is the one that must have room for the operation.
The volume is marked dirty
A dirty volume has been flagged for a filesystem check, often after an improper shutdown or a detected filesystem problem. The defrag command reference excludes a volume in this state until it has been checked with chkdsk.
- Save open work and close applications using the affected drive.
- Open Command Prompt with Run as administrator.
- Run
chkdskfor the affected drive and follow the prompts Windows provides. - Restart if Windows schedules the check for the next boot.
- After the check completes, open the optimizer again and retry the operation.
If the check reports a persistent filesystem problem, resolve that condition before attempting another optimization. Defragmentation is not a substitute for repairing filesystem errors.
Also popular on Amazon
- Note: Not suitable for MacBooks released after 2023 or devices with a protruding front camera; Not applicable to full-screen or notch-style tempered glass screen protectors; Do not use on the rear camera of the phone.
- 💻 Why Do You Need a Webcam Cover Slide? — Safeguard your privacy by covering your webcam with our reliable webcam cover when not in use. Don't let anyone secretly watch you. Stay protected!
- ✅ Thin & Stylish — Enhance your laptop's functionality and aesthetics with our 0.027" ultra-thin webcam covers. Seamlessly close your laptop while adding a touch of sophistication.
- ✅ Fits Most Devices — Compatible with laptops, phones, tablets, desktops! Keep your privacy intact on Ap/ple, Mac/Book, iPh/one, iP/ad, H/P, L/novo, De/ll, Ac/er, As/us, Sa/msung devices.
- ✅ 365 Days Protection — Our upgraded 3.0 adhesive ensures a strong hold that won't damage your equipment. Experience reliable, long-term privacy protection day in and day out.
The volume is locked or in use
Locked volumes can be excluded from the command. Close programs that are reading or writing heavily to the drive, including file-transfer windows, media libraries and backup jobs, then try again. Some system volumes may require Windows to schedule work for a restart instead of modifying every file immediately.
You selected a drive type the command does not support
Microsoft’s command reference excludes network drives, CD-ROM drives and filesystems other than NTFS, ReFS, FAT or FAT32. A network location therefore cannot be repaired by pointing defrag.exe at it, and an optical disc is not a defragmentation target.
Another optimization is already running
Check whether the graphical utility, a scheduled task or an administrator Command Prompt is already operating on the same volume. Stop waiting for the existing operation to finish or close it before starting a different interface. Running two defrag methods against one volume is not supported.
Windows does not show the drive
If the volume is missing from the utility, first confirm that it appears in File Explorer and that Windows has assigned it a drive letter. A drive that is not recognized by Windows cannot be selected for optimization. Resolve the detection or connection problem first; the defrag tool cannot repair a volume it cannot access.
How much free space should I leave before trying again?
The documented threshold for complete and adequate defragmentation is 15% free space on the target volume. Treat that as a minimum operating requirement, not as a promise that an HDD will become faster afterward.
Use File Explorer’s drive properties to check the exact volume you selected. If it is below the threshold, remove only files you understand and are permitted to delete, or move them to another storage location. Avoid deleting Windows or application files just to reach a percentage; freeing personal data is the safer first step.
How do I check scheduled optimization?
Windows automatically optimizes drives by default once per week, according to Microsoft Support. You can review or change that schedule in the same utility.
Also popular on Amazon
- Anti-Slip Surface - Transform your laptop into a mobile workstation with the AboveTEK portable laptop lap desk. The anti-slip surface provides a strong grip for laptops up to 15.6 inches(Diagonal), while the double rubber strip on the bottom ensures a stable display or typing experience on your lap, couch, or bed.
- Retractable Mouse Pad - Retractable laptop mouse pad extends on both directions for the left/right handed with elevation along the edges for stopping mouse from falling off. The size of laptop tray is 14" X 9.7" and the size of mouse pad is 7.4" X 6.1".
- Effective Heat Shield - The effective heat shield made of sturdy and thick material protects your laptop from overheating. Prioritizes your comfort and safety, an ideal lap pad or board for working anywhere.
- EASY to Carry and Store - With an ergonomic and simplistic design, the lap desk is portable to store in a backpack. Only 15" in size, 2.2 lb of weight and with slim 0.6 inch thickness, it is ready to be easily carried around.
- Widely Applicable - The smooth platform accommodates laptops and tablets up to 15.6 inches(Diagonal), making it a versatile accessory and one of the best gifts for mom, dad, students and professionals. Perfect for use as a laptop bed tray or tablet holder anywhere at home, library, or park.
- Open Defragment and Optimize Drives.
- Under Scheduled optimization, select Change Settings.
- Choose the frequency offered by Windows: daily, weekly, monthly or disabled.
- Confirm the drives included in the schedule, then save the setting.
Scheduled optimization is preferable to repeatedly starting manual runs without checking the drive type. For SSDs, the scheduled task uses the SSD-appropriate maintenance rather than asking you to perform traditional defragmentation yourself. Microsoft Learn documents a once-per-month traditional optimization cadence for SSDs within the scheduled task; the visible schedule setting and Windows’ media detection determine how the task is applied.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →What is the safest troubleshooting order?
Use this sequence when the app reports an error or appears to do nothing:
- Confirm that you selected the intended volume.
- Check whether Windows identifies it as an HDD or SSD, then use Optimize rather than forcing a method manually.
- Verify that the target volume has at least 15% free space.
- Close the graphical tool or any existing command so only one operation is active.
- Check for a dirty-volume condition and run
chkdskbefore defragmenting if Windows requires it. - Confirm the volume is local and uses a supported filesystem rather than being a network drive or optical disc.
- Retry from the graphical utility.
- If the GUI remains unavailable, run the administrator commands
defrag C: /a /u /vfor analysis ordefrag C: /o /u /vfor optimization.
This order separates a storage-health problem from a simple scheduling or interface problem. It also prevents the common mistake of applying HDD-style expectations to an SSD.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When should I stop trying to defrag?
Stop and investigate further if Windows repeatedly reports filesystem errors, the volume disappears, or the drive produces symptoms beyond fragmentation, such as repeated read failures. The optimizer can reorganize or trim supported volumes, but it is not a general-purpose repair utility for a failing storage device.
For a normal HDD or SSD that is visible, healthy, supported and has sufficient free space, the built-in Windows workflow is the appropriate first fix. Once the operation completes, leave scheduled optimization enabled unless you have a specific administrative reason to manage it yourself.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsAs an optional shortcut after the manual checks, Outbyte PC Repair can address more than 100 common Windows issues, including broken system elements and shared DLL problems, while also offering settings tweaks, temporary-file cleanup, privacy controls, vulnerability checks, a real-time boost, file shredder and crash logging. It runs on Windows 11, 10, 8 and 7; its free trial lasts at least two days before a subscription, and it complements an antivirus rather than replacing one.
Defrag computer FAQ
Does Windows need an internet connection to optimize a local drive?
The built-in optimizer works against the local volume selected in Windows, so its basic operation is separate from downloading a third-party utility. If Windows cannot see the volume, fix the drive-recognition issue first rather than treating it as a defragmentation failure.
Why does the Optimize button use the same wording for HDDs and SSDs?
Optimize is the general Windows action, while the underlying method depends on the media type. The same button can therefore start traditional defragmentation on an HDD or TRIM-style maintenance on an SSD.
Also popular on Amazon
- Spacious Design: Measuring 21.1" wide and 12" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
- Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy laptop support with the integrated device ledge.
- Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
- Durable Surface: Work with confidence on our lap desk's solid surface, featuring a blush pink color, ensuring optimal air circulation to prevent your laptop from overheating.
- On-the-Go Convenience: With an integrated handle and lightweight design (2.14 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
Can I optimize a network share from my PC?
No. Microsoft’s defrag command reference excludes network drives, so a mapped share is not a supported target for this utility. Optimize the physical storage on the computer or server that owns the share instead.
What happens if I disable scheduled optimization?
Windows provides daily, weekly, monthly and disabled choices under Change Settings. Disabling the schedule means you must monitor and start appropriate maintenance yourself; leaving it enabled lets Windows apply its default automatic optimization behavior.
Frequently Asked Questions
Does Windows need an internet connection to optimize a local drive?
The built-in optimizer works against the local volume selected in Windows, so its basic operation is separate from downloading a third-party utility. If Windows cannot see the volume, fix the drive-recognition issue first rather than treating it as a defragmentation failure.
Why does the Optimize button use the same wording for HDDs and SSDs?
Optimize is the general Windows action, while the underlying method depends on the media type. The same button can therefore start traditional defragmentation on an HDD or TRIM-style maintenance on an SSD.
Can I optimize a network share from my PC?
No. Microsoft’s defrag command reference excludes network drives, so a mapped share is not a supported target for this utility. Optimize the physical storage on the computer or server that owns the share instead.
What happens if I disable scheduled optimization?
Windows provides daily, weekly, monthly and disabled choices under Change Settings. Disabling the schedule means you must monitor and start appropriate maintenance yourself; leaving it enabled lets Windows apply its default automatic optimization behavior.
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.

