PDF download Download Article
Learn how to remove write protection from your USB drives
PDF download Download Article

Do you have a USB drive that's set to read-only mode, and you're not sure how to remove that? If so, this is the article for you. In this article we go over a number of ways to remove write protection from a USB drive on both Windows and Mac so you can get back to working with your files. Keep reading to learn more.

Ways to Remove USB Write Protection

  • Use diskpart to remove the read-only attribute from your USB drive (Windows).
  • Use the Registry Editor to change the WriteProtect value in your registry (Windows).
  • Fix problems with the drive in Disk Utility on Mac.
  • Make sure the USB drive's lock switch isn't set to "lock" or "read only."
Method 1
Method 1 of 6:

Use Diskpart (Windows)

PDF download Download Article
  1. Use an open USB port on your computer to plug in the drive.
    • Make sure you have a backup of the drive before continuing.
  2. This will open the Run window.
    Advertisement
  3. Press Enter to run the command, or click the OK button.
    • If you get a confirmation window that asks if you're sure that you want to open diskpart, click the Yes button.
  4. Press Enter to run the command.
  5. The list disk command shows all the drives connected to your computer, including your hard drive. The easiest way to find your USB drive is by looking at the size column. Your USB drive will likely be a much smaller size than your hard drive.
  6. Press Enter to run the command. Replace the # with the disk number you found in the previous step.
    • For example, if your USB drive is disk 2, you'd write select disk 2.
  7. Press Enter to run the command. Once the command is run, you'll see a message stating that the read-only attribute was removed from your drive.[1]
    • You can now exit the diskpart window. Remember to safely eject your USB drive when you're ready to remove it from your computer.
  8. Advertisement
Method 2
Method 2 of 6:

Use Regedit (Windows)

PDF download Download Article
  1. Use an open USB port on your computer to plug in the drive.
    • Make sure you have a backup of the drive before continuing.
  2. If diskpart doesn't work, you can remove the read-only state from your USB drive using the Registry Editor. However, be aware that editing the registry incorrectly can cause a lot of issues with your computer, and can even render it unusable. Always make sure to back up your registry before editing it.
    • To back up your registry, click HKEY_LOCAL_MACHINE in the sidebar, then click File > Export. Save that exported file in case you need to restore your registry.[2]
  3. To get there, open these folders in the left-hand pane:
    • HKEY_LOCAL_MACHINE
    • SYSTEM
    • CurrentControlSet
    • Control
    • StorageDevicePolicies
      • If the StorageDevicePolicies key doesn't exist, you'll need to create it. While in the Control key, right-click in the empty right pane and click New > Key.
      • Name the new folder "StorageDevicePolices."
      • Click on the new StorageDevicePolicies key.
      • Right-click in the empty right pane and click New > DWORD (32-bit) Value.
      • Name the value "WriteProtect."
  4. This will open a window where you can edit this value.
  5. Click OK to save the change. Restart your computer, then check the USB drive again to see if it's still write-protected.
  6. Advertisement
Method 3
Method 3 of 6:

Use Disk Utility (Mac)

PDF download Download Article
  1. Use an open USB port to plug in the drive.
    • Make sure you have a backup of the drive before continuing.
  2. You can launch Disk Utility from the Utilities folder inside your Applications folder, or by pulling up Spotlight and typing "Disk Utility" and selecting it.
  3. It's next to the "Disk Utility" header, and it has an icon of a rectangle with a sidebar.
  4. If you don't have this option available, skip to the next step.
  5. It will be under the header that says "external." If you have other external drives plugged into your computer, make sure you're selecting the right one. The sidebar will have the drive's name, and if you click on it, you'll be able to see the amount of storage on the drive to narrow down which one is the right one.
  6. When prompted if you want to run First Aid, click Run.[3]
  7. Check the drive to see if it's still in read-only mode.
  8. Advertisement
Method 4
Method 4 of 6:

Ignoring Ownership (Mac)

PDF download Download Article
  1. Use an open USB port to plug in the drive.
    • Make sure you have a backup of the drive before continuing.
  2. It should be under the "Locations" header. If you have multiple drives plugged into your computer, you'll need to narrow them down by name.
  3. This will open a new window with information about the drive.
  4. If the lock in the bottom-right corner is locked, click it to unlock it before proceeding.
  5. Now, check the drive to see if it is no longer in read-only mode.[4]
    • If the USB drive was used to hold Time Machine backups, you won't be able to check this option.
  6. Advertisement
Method 6
Method 6 of 6:

Replace the Drive

PDF download Download Article

Community Q&A

Search
Add New Question
  • Question
    My flash drive is in a current read only state but not read only, how do I fix this?
    Community Answer
    Community Answer
    Solution 1. Check the physical switch. Solution 2. Open regedit and change registry key. Solution 3. Use the manufacturer's USB repair tool to restore read-only to normal.
  • Question
    Only current read only state says yes and my flash drive doesn't have a lock switch, how do I fix this?
    Community Answer
    Community Answer
    Solution 1. Check the physical switch. Solution 2. Open regedit and change registry key. Solution 3. Use the manufacturer's USB repair tool to restore read-only to normal.
  • Question
    Only the current read-only state is yes, and all the others are no, how do I remove that?
    Community Answer
    Community Answer
    USB disk cannot be OFFLINED. Do the following; diskpart> sel disk, diskpart> attrib disk clear, Readonly, diskpart> attrib disk. Now try to write a file to this disk and let me know if it works.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Advertisement

About This Article

Hannah Dillon
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Hannah Dillon. Hannah Dillon is a Technology Writer and Editor at wikiHow. She graduated with a B.A. in Journalism from North Dakota State University in 2013 and has since worked in the video game industry as well as a few newspapers. From a young age Hannah has cultivated a love for writing and technology, and hopes to use these passions in tandem to help others in the articles she writes for wikiHow. This article has been viewed 291,732 times.
How helpful is this?
Co-authors: 13
Updated: July 7, 2025
Views: 291,732
Thanks to all authors for creating a page that has been read 291,732 times.

Is this article up to date?

Advertisement