Some days ago I was working with some Linux distribution and used my 16GB USB drive for installation, so after playing with the Linux image, I tried to remove Linux from USB and tried formatting the USB but Windows start giving me errors, that USB is “read only” and Windows can not format that particular USB Device.

So I search for the error and found, how to fix it, sharing it for others, who are facing same issue.

Press Win+R to open the Run box

Type diskpart in the run box, like the screen shot above.

At the DISKPART> prompt, type list disk and press enter

list disk

From the size of the disk, you should be able to figure out which one is your removable disk. In this example, we know that Disk 1 is our removable USB thumb drive because its size is listed as 14 GB, make sure you select the correct disk, otherwise you can lose your data in other drives.

Select your removable disk with the select disk command. In this example, we want to work with disk 1, so the command is

select disk 1

To clear the read-only attribute (making the disk writable), use the command

attributes disk clear readonly


Then type command

clean

That should do the trick, now exit and now you can use your usb again, you can try that with other types, like SSD, External drives etc.

*Also you can write protect your drives like this, for locking USB drives in future, you need to change the command, like this:
attributes disk set readonly

 

Now back to real topic if the above steps didn’t work for you like in my case, then you need to create partition and format the drive (formatting is optional), as you can do it from GUI too.

For creating partition, you need to repeat the above steps and use the command

create partition primary

Then select the partition by

select partition 1

and format it like

format FS=NTFS label=WC-Drive quick


Here we are formatting with NTFS file system, you can change it to FAT and VFAT if you want.

 

That’s it, you can now exit and you can see the USB in Windows Explorer, use it again like before 🙂

Enjoy & Take care