Published: September 19, 2015  |  Last updated: August 8, 2026

This guide has been updated. An earlier version recommended a third party tool called USBfix to clean infected USB drives. That tool is no longer maintained, and the approach it used, creating vaccine files to stop autorun infections, is obsolete on modern Windows because autorun from USB drives has been disabled by default for years. The good news is that Windows now includes everything you need to clean a USB drive safely, without installing anything.

Before you start

A few basic habits prevent most USB problems. Never plug in a USB drive you did not source yourself. Keep Windows updated and Microsoft Defender real time protection switched on, because Defender scans files on removable drives before they are opened. And when Windows shows the AutoPlay prompt after you insert a drive, choose to open the folder and view files rather than running anything from it.

Scan a USB drive with Windows Defender

If you suspect a drive is infected, run a targeted scan on it:

  1. Open the Windows Security app from the Start menu.
  2. Go to Virus and threat protection.
  3. Under Current threats, click Scan options.
  4. Choose Custom scan and click Scan now.
  5. Select your USB drive letter in the folder picker and start the scan.

Defender will scan every file on the drive and quarantine anything it finds. You can review the results under Protection history.

Command line option

If you prefer the command line, open an elevated Command Prompt and run:

MpCmdRun.exe -Scan -ScanType 3 -File E:\

Replace E: with your actual drive letter. This performs the same custom scan directly on the drive.

For stubborn infections, use Microsoft Defender Offline

If a drive or your PC is badly infected, especially with a rootkit, run Microsoft Defender Offline. It restarts your computer into a trusted pre boot environment and performs a thorough scan before Windows loads. You can start it from Windows Security, under Virus and threat protection, Scan options, Microsoft Defender Offline scan.

A portable second opinion

For extra confidence, download the free Microsoft Safety Scanner from Microsoft and run it against the drive. It is a portable on demand scanner that requires no installation. Keep in mind it expires about ten days after you download it, so download a fresh copy each time you need it.

About modern USB threats

File based viruses are the easiest to catch, but modern USB security also means being aware of attacks that scanning cannot see. A device can be reprogrammed to act as a keyboard and type commands the moment it is plugged in, an approach known as BadUSB. That is why the single best rule remains the simplest one. Only plug in drives you trust. For sensitive work, use encrypted drives, such as a BitLocker protected drive, and keep Windows 11 current, since older versions such as Windows 10 are no longer supported.

Conclusion

Cleaning a USB drive in 2026 needs no third party tool. Use Windows Security with a custom scan on the drive, fall back to Microsoft Defender Offline for stubborn cases, and add the Microsoft Safety Scanner as a portable second opinion. Combined with the simple habit of never inserting unknown drives, that covers you well.

Leave a Reply

Your email address will not be published. Required fields are marked *