How To Empty A Flash Drive On Mac

Insert your usb flash drive into your mac. Click the erase button in the toolbar. Mac offers filevault feature to password protect a flash drive on mac in simple clicks. Find your flash drive and click on it; In the sidebar, select the storage device you want to encrypt. Click the erase button in the toolbar.

Active11 months ago

I have a USB drive plugged into my Mac. What I found was .Trashes was not emptied when the emptying trash (right click the Trash icon and run 'Empty Trash') for the USB drive

What might be wrong? Is there any other way to empty trash the USB drive?

Allan
78.4k24 gold badges138 silver badges322 bronze badges
prosseekprosseek

How To Empty A Flash Drive On Mac Computer

5,32313 gold badges47 silver badges79 bronze badges
3

It's possible that there are files in some other user's trash. The .Trashes folder at the top of each volume has subfolders for each different user, by user ID number (e.g. user 502's trash is in .Trashes/502).
You can see if it for yourself using a command like this (replace VolumeName with your drive name):

Note: you might get a permissions error from this command, either because the .Trashes folder doesn't allow read access (solve this by adding sudo, e.g. sudo ls -ls ..., and entering your admin password when requested); and/or because of the privacy protections in macOS Mojave (10.14) and later (solve this by granting the Terminal access in System Preferences > Security & Privacy pane > Privacy tab > Full Disk Access category, see here for more details).

As you can see, on my USB disk .Trashes folder there's a sub foder called 502, owned by user ID 502 (for reference, my current user ID is 501). Since this user doesn't exist on my system, I see it as _unknown, and my user can't look inside of it, neither delete it. To look inside that folder we need to do it as administrator (i.e. use sudo).

If you are sure that you want to, you can delete everyone's trash by deleting the entire .Trashes folder with a command like:

Warning: as with anything involving sudo ('do as super user', i.e. system administrator) and rm -R, use this carefully. If you type it wrong, it could have ... unpleasant consequences.

Gordon DavissonGordon Davisson
29.4k6 gold badges61 silver badges81 bronze badges
5

Usual behavior:
When you delete something off a USB drive, it is moved to a .Trashes folder on that volume. When plugged into your computer, deleted items will appear in your trash bin with everything else.

When you unplug it, items that you've deleted from that drive will no longer show up in your trash UNTIL you plug it in again. Then, you can empty the trash. It will really delete them from that drive.

If that isn't happening for you, here's my suggestion:

  1. Select the drive in your Finder sidebar.
  2. Without selecting anything else, press cmd-i (or use menu item FileGet Info).
  3. Use the Sharing and Permissions section of that window to give Everyone the permissions to Read and Write.
dwightkHow To Empty A Flash Drive On Mac
7,37414 gold badges43 silver badges67 bronze badges
Nathan GreensteinNathan Greenstein
27k24 gold badges97 silver badges132 bronze badges
1

I don't know wether it's the best answer, but at least it's working answer.

Open the command line, cd to the USB volume (/Volumes/USB for my case), and type:

John K
1,9723 gold badges21 silver badges38 bronze badges
prosseekprosseek
5,32313 gold badges47 silver badges79 bronze badges
1

2 Solutions. 1 using Bash the other using Bash wrapped in AppleScript.

Solution #1

  1. Create a new AppleScript with /Applications/Utilities/AppleScript Editor
  2. Type the following code:

    do shell script 'rm -rf /Volumes/*/.Trashes/*' with administrator privileges

  3. Save the file to somewhere convenient and run it whenever you need to clear the USB Trash
  4. This can be executed by double-clicking on it

NOTE: This will empty the Trash for all connected volumes including your internal hard disk. If you have connected 5 USB drives and a Firewire hard disk, it will empty the trash for all of them.

How To Empty A Flash Drive On Mac Pro

Solution #2

  1. Fire up your favourite text editor (mine is nano)
  2. Paste the following code into your text editor and save the file

    #!/bin/bash
    sudo rm -rf /Volumes/*/.Trashes/*

  3. Save the file to somewhere convenient with the extension .sh and then make it executable with chmod +x {filename}.sh from Terminal

  4. Run that with ./{filename}.sh

NOTE: Same note as above. This is executable from Terminal.

Danijel-James WDanijel-James W
5,6287 gold badges30 silver badges59 bronze badges

I use this script AppleScript, save it as Application :

Drag/Drop Volume(s) on the application.

This script removes the items from your trash (user ID) folder on the volume.if other users use the volume this script will not delete the items from their trash folder, otherwise the script would need an administrator password to do that.

If you want to eject the volume after emptying the trash, use this script.

nohillside
79.6k34 gold badges176 silver badges220 bronze badges
Tony_kenyaTony_kenya
1Drive

You must log in to answer this question.

Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Not the answer you're looking for? Browse other questions tagged usbtrash .

I’m cleaning out an old cupboard and finding all sorts of old thumbdrives [usb flash drives]. I don’t want them but I don’t want important data on them either. What’s the easiest way to wipe them clean or erase them? I have an iMac.

You’re smart to make sure that the USB Flashdrives you’re finding (or are they “Flash Drives” two words? I never remember!) are empty of data because you just never know what might be on it and identity theft isn’t just in the movies, unfortunately. I mean, perhaps your Mom used it to bring a copy of her taxes to the accountant, or you have spreadsheets of invoices payable from your clients back when you weren’t using the Cloud?

There are a couple of ways you can proceed in this situation, one of which is to physically destroy the thumbdrives [“thumb drives”?] with a pair of pliers. Physical destruction is generally a one way street with electronics, but the old gadgets might well be useful to someone else and while they’re inexpensive commodities, an 8GB or 16GB drive can still be darn valuable to a school kid! So let’s not destroy them if it’s not necessary.

On a Mac the program of choice is Disk Utility, something supplied by Apple. Plug in the drive you want to clean up and, if you’re in Yosemite, press Command-Space to launch Searchlight and type in “disk u”…

As you can see, the top hit is the program you want, “Disk Utility”. If you’re not yet on Yosemite, you can still use Spotlight, just click on the magnifying glass icon on the top right of your menu bar…

Once it launches, you’ll see the drives and storage devices that are visible:

BE REALLY CAREFUL that you don’t choose your main hard drive for your computer. If you’re not 100% sure you’ve chosen the right device, pull the USB Flash Drive out of your computer, wait to see what disappears from Disk Utility, then plug it back in and select it.

I kid you not, if you choose your main hard drive, you will lobotomize your iMac and be really upset with me. So please don’t.

Pick the right drive — and notice that these flash drives generally have very little capacity (this one is an 8.02GB unit) — then click on “Erase” along the top set of tabs so that you can see the options shown above.

I generally recommend you format USB drives in “MS-DOS (FAT)” format so that they’ll work with both Mac and PC systems. If you want a Mac only drive, however, just change to that a Mac format like “Journaled” but not encrypted.

Now a big decision: If the information does have potential security ramifications, I’d click on “Security Options….” so you can select a secure erase. The caveat is that even on a small device these sort of “write garbage, delete it, write garbage, delete it” loops can take a while, and on a big drive? It can be hours.

If the data’s just things like photos or files from your college stats class, then a regular erase will work fine. Click on “Erase…”

What this does is basically redo the “table of contents” of the drive to indicate that there are no files. So pop it into a Mac or PC and it’ll just show up as a free space with nothing actually on the device. It doesn’t erase the contents, however — that’s what the Secure Erase does — but in my experience, 99% of people have no idea of the difference, so unless you luck out and have a curious hacker get ahold of it, this is fine.

Proceed? Choose “Erase”. And remember, you can always go back and do the Secure Erase too, if you want.

After a few seconds, the new file access table is written to the device and it shows back up in Disk Utility as empty:

That’s all there is to it. Elapsed time is about 60 seconds, if that, so you can do this for a box full of USB drives easily enough if you need to.

Let’s Stay In Touch!

I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!