I upgraded my SSD by dd'ing the old drive to a new drive under Linux. This has the side effect of also copying "empty space."

Is there a way to ask Windows to trim the NTFS unused blocks? Other than filling up the drive with a giant file and removing it? On Linux we would use fstrim.

Closest existing question I could find was this one that points to vendor tools that trims the whole drive, or a tool that simply fills the drives and removes the file:

How to manually trim an SSD in Windows 7?


You can use the Optimize-Volume cmdlet in an elevated powershell:

PS C:\>Optimize-Volume -DriveLetter H -ReTrim -Verbose

Additional references: https://winaero.com/blog/trim-ssd-windows-10/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.