Posts Tagged ‘defrag command prompt’

Free Ways to Optimize and Defrag Drives in Windows 10

May 16th, 2019 by Admin

As files are created or deleted over time, your disk will become fragmented, causing your system not to run as efficiently as it used to. To improve the performance of your PC, you have to defrag hard drive on a regular basis. Here are some free ways to optimize and defrag drives in Windows 10.

Method 1: Using the Built-in Optimization Drive tool

In File Explorer, right-click on the drive you want to defrag and select Properties from the context menu. When the Properties window appears, select the Tools tab and then click on Optimize.

A new window will appear with details about your hard disk drives. You can click on the Analyze button to tell you how fragmented the drives are, and then click on the Optimize button to begin the defragmentation.

Method 2: Optimize and Defrag Drives with Command Prompt

Open the Command Prompt as administrator, and then run the following command to optimize and defrag a specific drive in Windows 10:
defrag D: /O

Remember to replace D: with the actual drive you want to defrag. If you need to perform a boot-time defragmentation, try boot into Advanced Boot Options and access Command Prompt. From there you can run the above command to defrag your drives.

Method 3: Optimize and Defrag Drives with PowerShell

Open Windows PowerShell as administrator, and type the following command to analyze your drive. Look at the bottom of the output, it will advise whether or not you need to defrag the drive.
Optimize-Volume -DriveLetter D -Analyze -Verbose

If you decide to defrag a drive, execute this command:
Optimize-Volume -DriveLetter D -Defrag -Verbose

For Solid State Drive, defragging can cause performance issues and even reduce the life of the drive. You should use the trim command to erase unused blocks which are no longer in use:
Optimize-Volume -DriveLetter D -ReTrim -Verbose

Conclusion

There are also many free defragging tools (such as Auslogics Disk Defrag Free, Defraggler) that can make disk defragmentation easier and faster, but I think the built-in defrag tool in Windows 10 should be enough.