How to Fix a Broken USB Drive

Listing all the connected drives

lsblk

Repairing

  • gnome-disks > Repair drive
  • gnome-disks, GParted or other tool: Delete partitions > Create new partitions > Create a FAT filesystem
  • fsck:
    • sudo fsck /dev/sdd1
    • sudo fsck -a /dev/sdd1 # automatic repair
  • writing zeros all over the USB drive & creating a new partition
    • sudo dd if=/dev/zero of=/dev/sdd1; sudo mkfs.msdos -f 32 /dev/sdc1

Sources