Apple - Emptying trash of the USB drive

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):

ls -la /Volumes/VolumeName/.Trashes/
total 0
d-wx-wx-wt@  3 _unknown  _unknown   102 10 Feb 18:15 .
drwxrwxrwx@ 21 root      wheel      782 13 Feb 14:17 ..
drwx------@ 35 _unknown  _unknown  1190 13 Feb 14:18 502

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:

sudo rm -R /Volumes/volumeName/.Trashes

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.


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.

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:

/bin/rm -rf ./Trashes/* works fine with me.

Tags:

Usb

Trash