14 Replies Latest reply: Jul 23, 2015 11:41 PM by nfmbf
rollerboy_1979 Level 1 Level 1 (0 points)

Is it possible to selectively delete a file from Trash without emptying everything?


iMac (24-inch Early 2009), Mac OS X (10.6.8)
  • BDAqua Level 10 Level 10 (120,655 points)

    Only with a 3rd Party App like this...

     

    http://www.macupdate.com/app/mac/11390/smart-trash/

     

    I suggest making an interim folder if you do this often... like Possible Trash, move things to that, then once you're certain, move things you're sure you want to Trash to the Trash!

  • Niel Level 10 Level 10 (281,530 points)

    Yes. Choose Customize Toolbar from the Finder's View menu, add the delete button to the toolbar, select that file, and use the button.

     

    (68612)

  • rollerboy_1979 Level 1 Level 1 (0 points)

    Thanks Niel,

     

    I added the Delete button to the Toolbar on the Trash Folder, and it removes the item, but it puts it back on my Desktop. Also, when I select certain files, the "Delete" button is grayed out (?). I guess I'll have to create a "Possible Trash Folder" and go that route.

     

    Rollerboy_1979 

     

    Message was edited by: rollerboy_1979

  • BDAqua Level 10 Level 10 (120,655 points)

    No offence, but are you a Windows switcher? Because OSX is a whole 'nother ball of wax.

  • rollerboy_1979 Level 1 Level 1 (0 points)

    Yes, I'm a former Windows user.......... aren't we all?  LOL!  I've been MAC for about a year now, and I'm still getting aclimated.

  • BDAqua Level 10 Level 10 (120,655 points)

     

     

    Been using Macs since OS7.2.1... no way to get used to it since they change everything all the time... iOSX7 & iOSX8 has convinced me to give up on Apple for the most poart, though I feel bad about users needing help.

  • johnkaplantech Level 1 Level 1 (0 points)

    Sorry, that's not correct. It's easy to selectively delete folders using Unix commands at a terminal prompt.

    Steps:

    1.) Open a terminal (Applications > Utilities > Terminal).

    2.) Navigate to the Trash:

      at the command prompt, enter:

      # cd ~/.Trash

    3.) To list everything in the trash, enter:

      # ls

    (Note this may give you a huge list that you have to scroll in the terminal screen to see.)

    4.) To delete a file, enter:

      # rm <file_name>

      (Note a few things here:

        - BE CAREFUL - this is not undo-able if you delete the wrong thing.

        - you don't have to type the whole name, you can use name completion

          by typing the tab key if the name is unambiguous

        - "rm" will only work in its naked form for files, you will get an error

          if you try to delete a directory this way.)

    5.) To delete a directory: double, triple, and quadruple check you are doing the right thing.

      ...And don't blame me if you screw up and delete your whole hard drive..

      ..and enter the dreaded:

      # rm -rf <directory_name>

     

    Happy deleting...

  • Pondini Level 8 Level 8 (38,720 points)

    Another reason not to use Trash for storage is, many backup apps (including Time Machine and CarbonCopyCloner), do not back it up. 

  • mardifromrb Level 1 Level 1 (0 points)

    So far, deleting via Terminal seems to be the only way that works for me. If you have Trash opened next to the Terminal window, you can after you type rm followed by a space at the prompt in Terminal, then drag a single or multiple files to the Terminal window. This makes it a little less geeky.

  • colin225 Level 1 Level 1 (0 points)

    it actually works!

     

    rm {and drag the file from trash into terminal window}

     

    Thanks @mardifromrb

     

    PS: It might be easier if you use 'Path Finder' instead of Finder. It's way better and has Terminal built in.

  • DheemanF04 Level 1 Level 1 (85 points)

    Create an automator service accepting files and folders from finder as input.

    add ask for confirmation

    then add run shell script

    select Pass inputs: as arguments

    type(rm -R "$@") without the brackets (including the quotes)

    save the service as something like, "Permanently Delete"

     

    For those who are not comfortable using the command line, there is rather an ingenious way....

    First create a folder  named "deleter" on desktop and in documents ( you can choose any 2 locations )

    Again create an automator service accepting files and folders as input.

    • optionally add "ask for confirmation"
    • "Move finder Items" to the 'deleter' folder (which was on the desktop/location1)
    • add 'get specified finder items" (ignore input on this action by right-clicking and selecting 'ignore input') and add the 'deleter' folder which was created in documents folder/location2.
    • add "move finder items" to 'desktop/location1' and tick 'replace existing files'
    • Now add run shell script and again ignore input. type :

    cd ~/Documents (or add the path to location2)

    mkdir deleter

    • save it

    The run shell script action was added so that this service can be used again and again... otherwise we would have had to create the the deleter folder in documents every time before using the service.

     

    try it out...!

  • UndergroundRiver Level 1 Level 1 (0 points)

    I did it! I used Terminal. Does that make me a true Mac Geek? I needed to delete directories, so I actually had to rm -rf the poor things (I managed NOT to reformat my HD!). I do have a suggestion for how to quickly type file names. Select the file in the trash finder window, hit enter, and rename it to something easy to type!

  • BDAqua Level 10 Level 10 (120,655 points)

    You are now a gek!

  • nfmbf Level 1 Level 1 (0 points)

    Go to Terminal, write rm then drag the files from the Trash. click enter. VOILA! the file is deleted.

     

    thanks @colin225!