To delete a few files from a flash drive, open the drive in File Explorer, select the files, and press Delete. To erase everything at once, format the drive: open Disk Management, right-click the flash drive’s volume, and select Format. On a Mac, use Disk Utility and click Erase. Formatting or erasing removes all data on the drive and can’t be undone, so copy anything you want to keep first.
This guide covers Windows 11, Windows 10, and recent macOS, following Microsoft’s Disk Management in Windows and Apple’s Disk Utility erase guide.
Which Option Do You Need?
| What you want | Use this | Can you undo it? |
|---|---|---|
| Remove a few files, keep the rest | Delete in File Explorer or Finder | Sometimes, with recovery tools, until new data overwrites them |
| Remove deleted files for good but keep the rest | Delete, then cipher /w (Windows) | No |
| Start over with an empty drive | Format in Disk Management or File Explorer, or Erase in Disk Utility | No |
| Give away or throw out the drive | Full format, or clean all in DiskPart | No |
Before you erase anything: Copy the files you want to keep to your computer, then open a few to make sure they copied. Unplug other external drives so you can’t pick the wrong one by mistake.
How to Delete Files From a Flash Drive
Use this when you only want to remove some files and keep the rest.
- Plug in the flash drive and open File Explorer (press Windows key + E).
- Select the flash drive in the left pane. If you can’t find it, these steps show how to open a USB drive on Windows 11.
- Select the files or folders you want to remove. Press Ctrl + A to select everything in the current folder.
- Press the Delete key, or right-click the selection and choose Delete. Confirm if Windows asks.
The files disappear from the drive and the free space goes up. Windows may delete files on a removable drive permanently instead of moving them to the Recycle Bin, so double-check your selection before you confirm.
Deleting files doesn’t wipe them. Deletion only marks the space as available, so recovery software can often bring the files back until new data overwrites them. If you need the files gone for good, use one of the options below.
Wipe Deleted Files Without Erasing the Rest
Windows includes a command that overwrites the free space on a drive, which is where your deleted files still sit. Microsoft’s cipher command reference says /w removes data from the unused disk space on the entire volume. Files you haven’t deleted stay where they are.
- Note the flash drive’s letter in File Explorer, for example E:.
- Search for Command Prompt and open it.
- Type cipher /w:E: (use your drive’s letter) and press Enter.
- Wait until the prompt comes back. On a large drive this can take a long time.
Delete Files From a Flash Drive on a Mac
- Open the flash drive in Finder.
- Select the files and press Command-Delete. They move to the Trash.
- Click the Trash in the Dock, click Empty, then click Empty Trash.
Apple’s Delete files and folders on Mac guide also lets you Control-click one item in the Trash and choose Delete Immediately. Until you empty the Trash, the files still take up space on the flash drive.
How to Erase Everything on a Flash Drive in Disk Management
You can open Disk Management by right-clicking Start or by pressing Windows key + R and running diskmgmt.msc. There are other ways of opening Disk Management in Windows 11 too.
- Right-click the Start button and select Disk Management.
- Find your flash drive in the list. Check the size and drive letter so you pick the right one. It’s usually labeled Removable.
- Right-click the flash drive’s volume and select Format.
- To fully erase the drive, clear the Perform a quick format box.
- Select OK, then select OK again to confirm.

The drive comes back empty and ready to use. A quick format creates a new file table but doesn’t fully overwrite or erase the volume, while a normal format, which is slower, fully erases any existing data on it.
Microsoft also notes that you can’t format a disk or partition that’s in use, so close any files open from the flash drive first.
How to Format a Flash Drive From File Explorer
You can also format straight from File Explorer:
- Open File Explorer and select This PC.
- Right-click the flash drive and choose Format.
- Pick a file system. See the table below if you aren’t sure.
- Clear Quick Format if you want a full erase.

- Click Start, then OK when Windows warns that formatting will erase all data on the disk.
The drive is wiped and ready to use. If a camera or car stereo needs FAT32, format the USB drive to FAT32 on Windows 11 instead. To check the current format first, see what file format your USB flash drive uses.
Which File System Should You Pick?
| File system | Best for | Keep in mind |
|---|---|---|
| exFAT | Sharing between Windows and Mac, large files | Some older TVs, cameras and car stereos can’t read it |
| FAT32 (MS-DOS (FAT) on a Mac) | The widest device support | Single files can’t be larger than about 4 GB |
| NTFS | Windows-only use | A Mac can read it but can’t write to it without extra software |
Apple’s Format a disk for Windows computers guide recommends MS-DOS (FAT) for drives of 32 GB or less and ExFAT for larger drives.
How to Wipe Every Sector With DiskPart
For the most thorough erase built into Windows, Microsoft’s clean command reference says clean all sets every sector on the disk to zero, which completely deletes all its data. Plain clean only removes the partition information.
Warning: DiskPart doesn’t ask “Are you sure?” If you select the wrong disk, clean all erases that disk instead, including your computer’s own drive, and the data can’t be brought back. Unplug every other external drive first.
- Search for Command Prompt, right-click it, and choose Run as administrator.
- Type diskpart and press Enter.
- Type list disk and press Enter. Find the flash drive by its size. Disk 0 is almost always the computer’s internal drive.
- Type select disk #, replacing # with the flash drive’s number, and press Enter. DiskPart says the disk is now the selected disk.

- Type detail disk and press Enter. Check that the model name and size match your flash drive.
- Type clean all and press Enter. This can take a long time on a large drive.
The drive has no partition left. To make it usable again, open Disk Management, right-click the unallocated space, and choose New Simple Volume, then follow the wizard. You can also stay in DiskPart and type create partition primary, then format fs=exfat quick, then assign to give it a drive letter.
Microsoft’s format command reference also offers a /P switch that zeros every sector during a format, and it notes that the /Q quick format option skips the sector-by-sector scan.
How to Erase a Flash Drive on a Mac
These steps follow Apple’s Erase and reformat a storage device in Disk Utility guide.
- Open Disk Utility from the Applications > Utilities folder.
- Choose View > Show All Devices.
- Select the flash drive in the sidebar, then click Erase. Select the device at the top of its group, not only the volume under it.
- Choose GUID Partition Map from the Scheme menu, pick a format, and enter a name. If the Scheme menu is missing, you selected the volume instead of the device.
- If Security Options is available, use the slider to choose how many times to write over the erased data, then click OK.
- Click Erase, then click Done.

Erasing deletes everything on the device. Secure erase options are available only for some storage devices, so if you don’t see Security Options, Disk Utility can’t do a secure erase on that drive. If you’ll use the drive with Windows PCs, pick ExFAT or MS-DOS (FAT) as the format.
How Secure Is a Full Erase?
A full format, clean all or an overwrite stops ordinary recovery software. Flash drives spread writes across their memory chips and keep spare areas that the computer can’t reach, so no overwrite can promise that every last copy is gone. For a drive that held very sensitive data, such as tax records or passwords, the surest choice is to keep it, or to physically destroy it before you throw it out.
If the Flash Drive Won’t Erase
- Write protection: Some flash drives have a physical lock switch. Slide it to the unlocked position and try again. If DiskPart says the disk is write protected, select the disk and type attributes disk clear readonly, as described in Microsoft’s attributes disk reference.
- Files in use: Close any documents, photos, or apps using the drive. You can’t format a disk that’s in use.
- Wrong drive selected: Check the size and drive letter in Disk Management or the disk number in DiskPart before you continue.
- Format fails or the drive vanishes: Try a different USB port, restart the computer, and try again. A drive that still won’t format may be failing and should be replaced.
- Need a file back? If you deleted something by mistake and haven’t written new data to the drive yet, stop using the drive and try these ways to find deleted files on Windows 11. Nothing brings back files after a full format or clean all.
Erasing a Flash Drive Questions
Does formatting a flash drive delete everything?
Yes. Microsoft and Apple both say formatting or erasing removes all data on the drive. A quick format leaves the old data recoverable, though, so turn quick format off or use clean all before you give the drive away.
Is deleting files the same as erasing the drive?
No. Deleting removes the files you select and marks their space as free. Erasing or formatting clears the whole drive and creates a new file system.
How long does a full format take?
It depends on the drive’s size and speed. A quick format takes seconds. A full format or clean all writes to the whole drive, so a large or slow USB 2.0 drive can take an hour or more.
Can I undo a format?
No. Windows and macOS have no undo for formatting or erasing. After a quick format, recovery tools can sometimes find old files, but after a full format or clean all, plan on the data being gone.
More Flash Drive Guides
- How to put files on a flash drive in Windows
- How to scan a USB flash drive with Norton 360
- How to fix a slow computer in Windows 11

Matthew Burleigh is the founder, head writer, and editor of Solve Your Tech, which he launched in 2012. He has written technology tutorials since 2008 and worked in IT since 2003, including small-business support, IT management, and consulting. He holds Bachelor’s and Master’s degrees in Computer Science from Arizona State University.
Matthew writes practical guides for Windows, iPhone and iPad, Microsoft Office, Outlook, Google apps, and Android. Solve Your Tech’s guides are checked step by step against the device or app maker’s own documentation and tested on his own devices whenever he has the hardware or software, with clear steps, sources, and update dates.
Read more about Matthew and how Solve Your Tech writes and updates its guides, or report a correction.