Free space on USB by emptying trash?

Discussion in 'Mac Accessories' started by sytrusze, Oct 11, 2011.

  1. sytrusze macrumors member

    Joined:
    Nov 17, 2010
    #1
    Dear members,

    since i own a mac, i have been struggling with this issue. My usb stick is ALWAYS full, according to my mac. The only way to free space is to ... empty my trash ... :confused:

    Can't believe Apple still hasn't fixed this. I've been doing this for 3 years right now and i'm starting to get real frustrated about it because sometimes i wan't to recover something out of my trash can but then i remember i've deleted everything.

    Isn't there a way to fix this, or a workaround instead of emptying the trash all the time?

    thanks.
     
  2. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #2
    Your post is confusing?
    You seem to want Mac OS X to automatically empty the Trash of a USB flash memory thumb drive (probably, though USB can be used to connect a plethora of peripherals), so that there is always enough capacity to store something on it, but you also want to recover data you might have deleted from that USB device.

    Is that correct?

    Have you looked into Time Machine yet? And if we are indeed talking about a USB flash memory thumb drive, isn't its primary use to be a transfer medium and NOT a storage medium? I never used a USB flash memory thumb drive to just store a file, when no other copy of it existed elsewhere, unless it was a file I wouldn't be sad about losing.

    Btw, if we are talking about a USB flash memory thumb drive, there was a similar topic a while ago, where the OP was frustrated, that s/he had to empty the Trash all the time, and pissed at Mac OS X, that it would not delete the dat without going via Trash, assuming Windows would do it that way, which it doesn't as a standard. One has to hold down the SHIFT key in Windows, if one wants to delete a file or folder without going via Trash.

    PS: When I delete data of my USB flash memory thumb drive I simply press SHIFT+OPTION+CMD+BACKSPACE to empty the Trash, when I delete files to make room for other data.

     
  3. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #3
    You're in luck - the way to fix this problem is to use the Trash how it is meant to be used, i.e. only for files you actually want to delete.
     
  4. sytrusze thread starter macrumors member

    Joined:
    Nov 17, 2010
    #4
    Right, like you never ever experienced that in your life before :eek:

    @simsaladimbamba: First of all, thanks for your post and i'm sorry if my post is confusing.
    It is indeed an USB flash memory thumb drive, but i don't want to recover deleted data from it. I actually put music on the USB thumb drive for my usb radio in my car. When I get tired of these songs, I want to put new songs on the thumb drive.

    Let's say the thumb drive is 4GB. The songs on my USB thumb drive are 3,8GB. I delete all these songs and want to new music on it worth 1,8GB, i always get a message that the USB is full, even though i've deleted everything on my drive.

    The only way to fix this, is by emptying my trash can. Why? I don't have a clue, it just doesn't make sense having to empty the trash can on your mac to free space on your USB thumb drive.
     
  5. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #5
    To the OS, be it Windows or Mac OS X, the kind of device you store things on (let's except CDs and DVDs from this) doesn't matter.
    If the OS would behave like you want (not delete via Trash), then it would do so on all storage devices, like the internal HDD/SSd, an external HDD and a USB flash memory thumb drive.
    Windows has the advantage of using the SHIFT key to delete files without the Trash (Recycle Bin), but Mac OS X doesn't have that functionality.

    The Trash (or Recycle Bin) is a safe guard for deleted files, in case you need to recover some file. Only if you really empty the Trash, recovering is not possible via normal means. The same applies for a real life trash bin. You throw away a piece of paper you don't need right now, but later, you discover, you need the piece of paper. All you have to do is look into the trash bin. If you wold have emptied the trash bin into the trash container, recovery would be harder, as you have to go to the trash container and hope it is still there.
    The Trash on Mac OS X can only work, if no data is actually deleted, thus no new data can be written over the "place" where the data in the Trash bin actually resides on. By emptying the Trash you tell the OS, it is okay to use the "place" the older and now completely deleted data used to reside in, as that place is now empty.

    If the OS would behave like you want it to, putting files into the Trash would free up space (and the "places"), you could not recover data from the Trash, as it would be overwritten by the new data, thus making the existence of the Trash irrelevant.

    I don't know, why it would be so difficult to use the key combo I provided or use the mouse to empty the Trash, as the Trash is there to safeguard data.

    You could try this though, but it is more tedious as using the Trash and the key combo I provided earlier, but maybe it is not for you: http://www.usingmac.com/2008/6/2/delete-files-without-going-to-trash-folder
     
  6. sytrusze thread starter macrumors member

    Joined:
    Nov 17, 2010
    #6
    Thanks for your reply and clear explanation again.

    The main problem isn't that I have to go to the trash can and empty it and that a shortcut would make it much easier. The main problem is that (I guess) I'm still used to windows, where the trash can (recycle bin) doesn't reserves 'place' on the USB thumb drive for files that are in the bin (which is a lot easier in my opinion, the only thing you'd had to do is just move the files to the bin, which would immediately free up the space on that usb thumb drive.

    But i guess i will have to make piece with it, and use the shortcut you've provided earlier.
     
  7. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #7
    I just tested this behaviour in Windows XP SP3 and I had one big file (1.7GB) on a 4GB USB flash memory thumb drive (formatted with FAT32), then duplicated it via Windows Explorer, thus I had twice the capacity taken. But when I deleted the duplicate, the file didn't go to the Trash, maybe it was due to the size, or Windows behaves with USB flash memory thumb drives, I don't know.

    That however would explain what you experienced. Mac OS X doesn't work that way.


    Btw, peace ≠piece.
     
  8. sytrusze thread starter macrumors member

    Joined:
    Nov 17, 2010
    #8
    LOL, epic failed myself there :eek:

    but you are totally right. Windows doesn't move the files to the recycle bin, instead it deletes them immediately and you can't undo it.

    That totally makes sense. I think apple really thought about that, although i do think they should give us the option to either move the files to the trash can or immediately delete them.

    Anyway, i get the picture now. Thanks for sharing the information :)
     
  9. imahawki macrumors 6502a

    Joined:
    Apr 26, 2011
    #9
    Despite the fact that you poked fun, the advice you got was correct. You're using the trash can wrong. Setup a "temp" folder on your desktop or on your dock and move stuff you THINK you want to delete there instead of the trash. If you have something in your backpack and need more room, you don't take it out and put it in the trash for storage and then later take it out of the trash again. The trash is for trash, just like the real world. That Windows handles trash in a different way doesn't make it right, its just what you're used to.
     
  10. broadviewlady macrumors newbie

    Joined:
    Jan 6, 2013
    #10
    this is happening to me too

    I had the same problem as sytrusze.. When I delete files from my usb, they are sent to the mac's trash and you then have to delete them in the mac's trash before the room becomes available on the thumb drive.

    This thread actually solves my problem, I didn't know why the space wasnt becoming available on my thumbdrive once I sent the files to the trash. But the issue here is not not understanding how to use the trash, its a bit weird that on a mac you have to delete the files on the thumbdrive and then in the trash before space is available, but oh well. Thanks for the help.
     
  11. JesterJJZ macrumors 68020

    JesterJJZ

    Joined:
    Jul 21, 2004
    #11

    I know really...I've been in many situations before when had to use another person's machine and where there would ask "you didn't empty the trash did you?" with a really concerned look on their face. C'mon...it's a "trash" bin not a "maybe" bin...
     
  12. tbrill031 macrumors newbie

    Joined:
    Mar 17, 2013
    #12
    Empty trash using Terminal and linux commands

    Here is what seems to happen, and a solution:

    1) When you "Move to trash" the file is put under a hidden directory on your USB thumb drive (i.e. it does not free space)
    2) You need to find that hidden directory
    3) Then remove the files in order to free space

    I presume "Empty Trash" will delete those files on your thumb drive, but also on your main hard drive. The following will do it only for the USB thumb drive.

    TO FIND THE HIDDEN DIRECTORY:

    Launch the Terminal and enter these commands exactly as shown. The first command activates the ability to see the hidden files:
    defaults write com.apple.Finder AppleShowAllFiles TRUE

    Now you must relaunch the Finder by killing it, this is how the changes take effect:
    killall Finder

    Now you can use the Finder to look on your thumb drive - the directory will be named something like ".Trash" - the "." in front is what makes it hidden.

    If you want to hide hidden files again (those preceded with a .) and go back to the default Mac settings, you can just type the following:
    defaults write com.apple.Finder AppleShowAllFiles FALSE

    Again you will need to kill the Finder so that it can relaunch for changes to take effect:
    killall Finder

    PERMANENTLY REMOVE TRASH FILES FROM THUMBDRIVE:

    Now that you know the name of the hidden Trash directory, in the Terminal change to that hidden directory:
    cd /Volumes/name/directory
    For my machine this was:
    cd /Volumes/REMOVABLE/.Trashes/501

    Now remove them using linux rm command. But first
    pwd
    to "print working directory" and check you are under the right directory, and
    ls
    to make sure the files you want are there. Then something like:
    rm filename
    or
    rm *.pdf
    or whatever.
     
  13. sostorm macrumors newbie

    Joined:
    Nov 6, 2013
    Location:
    Dublin
    #13
    Empty USB completely using Disk Utility

    Don't understand how no one has mentioned the possibility to completely erase the USB disc by using the Disk Utility? The problem with just using the trash bin is that it doesn't always free up the entire space of the disc even after emptying trash (so say 880MB might be free on a 1GB disc although it looks empty).

    Go to HD: Utilities: Disk Utility and click the external USB drive/stick and go to the 'erase' menu. Click erase if you're sure you want to get rid of all information and the disk will be as new, with actual full capacity! Simple, easy and fast enough!
     
  14. Tonykenya macrumors newbie

    Joined:
    Feb 17, 2015
    #14
    The PERFECT SOLUTION....


    Thanks to Jacques Rioux and iorganutan
    I know this is an old thread -


    I use this script AppleScript, save it as Application :

    on open these_volumes
    set t_id to user ID of (system info)
    repeat with i in these_volumes
    if (kind of (info for i without size)) is "Volume" then
    set tPath to (POSIX path of i) & ".Trashes/" & t_id
    do shell script "/bin/rm -Rf " & (quoted form of tPath) & "/*"
    end if
    end repeat
    end open
    ----------------------------------------------
    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.

    on open these_volumes
    set t_id to user ID of (system info)
    set volToEject to {}
    repeat with i in these_volumes
    if (kind of (info for i without size)) is "Volume" then
    set tPath to (POSIX path of i) & ".Trashes/" & t_id
    do shell script "/bin/rm -Rf " & (quoted form of tPath) & "/*"
    set end of volToEject to contents of i
    end if
    end repeat
    if volToEject is not {} then tell application "Finder" to eject volToEject
    end open


    Discussion over.
    Edit
     
  15. dyt1983, Feb 17, 2015
    Last edited: Jun 1, 2015

    dyt1983 macrumors 65816

    Joined:
    May 6, 2014
    Location:
    USA USA USA
    #15
    edit: To remove personally identifying info not relevant to the conversation.
     
  16. DeputyDawg, Feb 12, 2017
    Last edited: Feb 12, 2017

    DeputyDawg macrumors newbie

    Joined:
    Nov 29, 2009
    #16
    --- Post Merged, Feb 12, 2017 ---
    Hello

    I have the same issue. I could have sworn I have done this before. However having issues now.

    I have a thumb drive which I just deleted a TON of files (big files) yet the free space gained was small.

    I did the above commands. However, when I got to the part where I cd into the /Volumes part I get:

    No such file or directory

    However, if I just cd into /Volumes and do an ls - its there:

    lrwxr-xr-x 1 root admin 1 Feb 4 09:54 Macintosh HD -> /

    drwxrwxrwx@ 1 Paul staff 670 Feb 4 09:55 Public

    drwxrwxrwx@ 1 Paul staff 16384 Feb 11 13:10 SD 32GB <---- THUMB DRIVE

    Any thoughts??
    **** UPDATE ******
    I was able to get into my thumb drive directory. The volume had a space in it, so use cd with " " around the volume name worked.

    I did get into .trashes. There was a folder beneath that called 501. When I cd into that, no files

    So where are all my files to delete?

    Note: I did empty the trash bucket. So does this remove the files in .trash? If so then why if I deleted so many (large) files did free space barely go up?
     

Share This Page