I used this USB drive to install CashyOS, which left it with boot-related partitions. Now I want to use it as regular storage again, but the partition manager is confusing me. The file browser shows only about 3 GB total and says the drive is full, while the partition tool shows a 31 GB Linux swap device. The USB stick was advertised as 124 GB. What is the safest way to erase the old partitions and restore the drive to its full capacity?
3 Answers
In the partition manager, make absolutely sure you have selected the USB drive—not your computer’s internal storage or memory device. Delete the existing partitions, create a new partition table using GPT, then create one new partition that fills the available space and format it as exFAT or another filesystem you need. Apply the changes only after double-checking the device and its capacity.
You can also use a tool such as GParted or the KDE partition manager to write a new GPT partition table to the USB. That removes the old installer layout, after which you can create and format a normal storage partition. Be very careful, because writing a partition table erases the selected device.
If the correct USB really reports a smaller capacity than expected, first verify the device name and size with the disk utility. Only if you are certain it is the USB should you use commands such as wipefs to remove old filesystem signatures, followed by creating a new GPT table. Never run those commands against an uncertain device path.

I eventually realized the 31 GB device was my RAM, not the USB drive. The flash drive was listed right above it, so I had been looking at the wrong device the whole time.