How to reformat an external SSD or HDD that is marked readonly

To low-level format and repartition an external SSD or HDD using diskpart, follow these steps to wipe the drive and remove the write protection:

  1. Open Command Prompt as Administrator:

    • Press Win + S, type cmd, right-click “Command Prompt,” and select “Run as administrator.”
  2. Run diskpart:

    • Type diskpart and press Enter.
  3. List disks:

    • Type list disk and press Enter. Identify your SSD (e.g., Disk 1).
  4. Select the SSD:

    • Type select disk X (replace X with the disk number of your SSD, e.g., select disk 1) and press Enter.
  5. Remove write protection:

    • Type attributes disk clear readonly and press Enter.
  6. Wipe the drive:

    • Type clean and press Enter. This removes all partitions and data, freeing the full drive.
  7. Create a new partition:

    • Type create partition primary and press Enter.
    • Type format fs=ntfs quick and press Enter to format as NTFS.
    • Type assign and press Enter to assign a drive letter.
  8. Exit diskpart:

    • Type exit and press Enter.

The SSD is now wiped, formatted, and ready for use. You can verify it in Disk Management or File Explorer.

Scroll to Top