Three ways to wipe a USB drive from Windows

CAUTION: The steps below will completely wipe the data from the USB drive you select. Make sure you choose the correct drive and backup any files on the drive you may need to keep. For example, this USB drive is F:

METHOD 1: Using the cipher command line tool

cipher is a built-in command line tool in the Windows operating system that can be used to encrypt or decrypt data on drives.

It can be used to securely erase the FREE SPACE on a USB drive. Note – this is FREE SPACE only – if you want to erase the entire drive you must first format the drive so that it ALL free space.

The free space is overwritten three times:

  • with a series of 0’s
  • with a series of 255’s
  • with a series of random numbers
  1. Click on the Windows button at the bottom left of the screen, type “cmd’ and when it appears in the list click on “Command Prompt”
  2. Enter the following command making sure to replace X with the drive letter you want to erase
  3. cipher /w:X:\

METHOD 2: Using the diskpart command line tool

diskpart is a built-in command line tool in the Windows operating system that is normally used to manage drives, partitions and mappings (partitions to letters) .

It can also be used to erase a USB drive by removing all existing partitions and writing a series of o’s.

  1. Click on the Windows button at the bottom left of the screen, type “cmd’ and when it appears in the list click on “Command Prompt”
  2. Enter the following command to start diskpart
  3. diskpart
  4. The diskpart program will load, once it’s ready you will see “DISKPART>” at the command prompt.
  5. Now enter
  6. list disk
  7. This will list all drives connected to the computer, each represented by a number (1, 2, 3 etc) – determine which is the USB drive by the amount of space. In this case it is Disk 3 but it may be different for your computer.
  8. Enter in the following command, making sure to replace # with the number of your drive from above
  9. select disk #
  10. The screen will display “Disk # is now the selected disk”. Now enter
  11. clean
  12. The wiping process will now start and may take several minutes to complete – depending on the size of the drive. When finished you will have an empty USB drive ready to reformat.

OPTIONAL STEPS: Format drive using diskpart

If you want to reformat the drive (assign a partition type and drive letter) you can do this using diskpart by entering the following commands.

CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT FS=FAT32 QUICK

NOTE: replace FAT32 with NTFS if you would prefer to use the NTFS. See

If you’re not sure which is right for you – check out FAT32 vs NTFS – how to pick the right format for your USB drive.

METHOD 3: Using Eraser (third-party software)

Eraser is a free program that is recommended by the creators of DBAN (a bootable hard drive erasing tool).

  1. Download Eraser
  2. Install and run
  3. Right-click in the middle area and choose ‘New Task’
  4. Under ‘Task Type’ choose ‘Run Immediately’ 
  5. Click on the ‘Add Data’ button
  6. Under ‘Target Type’ choose ‘Drive/Partition’
  7. Then from the list choose the drive you want to erase completely
  8. Optional: you can also choose the erase algorithm using ‘Erasure method’ – but I would only do this if I knew 100% what and why.
  9. Click ‘OK’ to save the changes
  10. The task should now look something like this
  11. Click ‘OK’ to save the changes
  12. Eraser will now start wiping the drive – it may take awhile depending on the size of the drive.

Was this article helpful?

Related Articles