Secure empty trash - El Capitan

Posted:
in Genius Bar
It was possible to completely empty the trash in OS X versions prior to El Capitan by using Secure Empty Trash in the Finder menu. That aspect was deleted in El Capitan. Googling the problem comes up a work around:
 http://www.macworld.com/article/3005796/operating-systems/how-to-replace-secure-empty-trash-in-os-x-el-capitan.html
 
I'm technically challenged, so I'm concerned I'd screw up things by using Terminal.

I'm not trying to do a Secure Empty Trash. I just want to empty the trash which tells me that  files are in use when it's not apparent that they are.  

Does anyone have a way to completely empty the trash? 

Thanks

Comments

  • Reply 1 of 3
    sphericspheric Posts: 2,556member
    Restart the machine; that should take care of any files that the system thinks are "in use" and make them deletable. 

    If it says files are in use when you say they aren't, then secure empty trash would not have made a difference.
    It won't let you erase them without using a terminal command to remove them, which is VERY easy to totally screw things up with, so I won't post it here. 


    cnocbui
  • Reply 2 of 3
    MarvinMarvin Posts: 15,322moderator
    sequitur said:
    I'm not trying to do a Secure Empty Trash. I just want to empty the trash which tells me that  files are in use when it's not apparent that they are.  

    Does anyone have a way to completely empty the trash? 
    There is a way to find what's using files. If you open a terminal and type the following and hit return:

    lsof drag_file_in_here

    it will tell you the process id of what has marked the file in use and you can kill the process. If you run the command on a movie on your hard drive that isn't open e.g

    lsof /Users/user/movies/movie.mp4

    it will return blank. Open the movie in Quicktime and run the command again and it will show that Quicktime is using it with the process id. If you moved the clip to trash and tried to delete it, it should warn that it's in use. You can quit the process in the Activity Monitor or the terminal (kill id_number). Once the process is quit, the files will delete ok.

    This problem has existed ever since OS X was introduced and it affects ejecting disks too. That was one of the first things I posted about here 10 years ago, still waiting:

    http://forums.appleinsider.com/discussion/61514/tip-to-help-eject-disks-that-are-in-use

    Apple eventually added a message that says what is using files and disks but it doesn't always list the process name. They seem to restrict the message to only name applications and exclude background processes. When it's QuickLook for example, it never says it by name. QuickLook is usually the culprit for me (QuickLook UI Helper). It gets stuck trying to create previews for certain files and then it prevents removing those files saying they are in use.

    I normally used secure delete to get round this too. Apple could improve the force-delete option they have that works for locked files. It does prevent people removing active system files, which can crash the system but when it detects QuickLook or the Finder using the files and disks, it should override it. Once an eject command is issued or files are located in trash, processes using files in those locations should be notified to stop using the files immediately.
    edited April 2016 sequitur
  • Reply 3 of 3
    sequitursequitur Posts: 1,910member
    Thanks Marvin, info much appreciated. I thought I was the only one with the problem.  I dislike Apple's way of taking away things that have been useful. Case in point: the Calendar drawer; the MacMail spinning wheel that indicates that Mail is hunting for incoming; ability to drag and drop names into the MacMail Subject Line; and others that I can't recall just now.  Apple giveth and Apple taketh away~! I've never understood why Apple removes useful aspects. 

    In his previous post, Spheric said he hadn't used 'Secure Delete' to get rid of undeleted files and suggested rebooting. That worked but seems overkill and is time consuming.  I continued googling and found a suggestion to empty Trash that didn't require Terminal or rebooting.  The suggestion was to right click on the undeleted files in Trash, then click 'Delete Immediately'. Since I had already gotten rid of the undeleted files by rebooting, I don't know if that works or not.

    If an AI user has this problem and tries the Delete Immediately method, I'd like to know if it really works. I could wait until it pops up again, but I'm curious to know now. 


Sign In or Register to comment.