Tip & How-To about Computers & Internet

Easy way to empty trash on a Mac when it tells your files are in use.

Ever try to empty your trash on your Mac and the system gives you an error telling you that a file in the trash can is in use and it will not allow you to get rid of it no matter what you try? Well, here's a little trick to help you get around this.

1. Open up terminal and type "sudo nano .bash_profile" and input your administrator password. This will allow you to view and edit this text file. We are going to use this to create an alias.

2. Click inside the terminal window to take control of an active cursor and use your arrow keys to move around. Type alias emptytrash='rm -rf ~/.Trash/*' into the window. Be sure to type the command exactly as shown otherwise you may end up deleting something you didn't intend to.

4. Press the "Control" key plus the "O" key to write the text out to the file and press enter to accept the default file name.

5. Press the "Control" key plus the "X" key to exit.

6. Close the terminal window.

Now any time you run into the issue of being unable to empty your trash due to stuck files, you can just open up terminal and type "emptytrash" and hit enter. Doing so will automatically run the 'rm -rf ~/.Trash/*' command and clean out your trash can for you, regardless of what is in there.

A video tutorial can be found here at the bottom of this tip.
I hope this helps!






Posted by on

Computers & Internet Logo

Related Topics:

Related Questions:

2 Answers

what is mac error code-8003


Hi,
If you are a Mac user then I know you have experienced this. You've been deleting files and your Trash Can is showing that there are items in it. You try to empty the trash and all of a sudden an error window appears. It probably looks something like this.
I share a link please visit and read it.
http://www.easypctutorials.com/how-to-fix-error-code-8003-os-x/

Thanks,
Apple Support

May 11, 2014 | Computers & Internet

1 Answer

fixing error code 8003 on macbook


Did you modify your Time Machine files in any way using Finder or the command line? This can cause this error. There's a program called Trash It that might be helpful if all you want is to get rid of those files.

Jun 29, 2012 | Apple 13-inch MacBook - Intel 2.0GHz Intel...

3 Answers

deleted wrong bloggie videos trash is empty how to restore? using a MAC


Take a look at this article: How to Recover Files Deleted in Trash Mac.

Note: before recovery, do not put more items to the Macintosh HD where those trashed stuff originally located. Best regards.

Jun 03, 2011 | Computers & Internet

8 Answers

accidently emptied a trash bin that contained a very import ant file. How to restore this file?


1. If you simply put files in the Trash you can restore them by opening the Trash (left-click on the Trash icon) and drag the files from the Trash to your Desktop or other desired location.
2. "Time machine" is a built-in backup tool that works with your Mac and an external drive, As the problem you described, I read it. The files deleted in Trash bin could be a different problem which Time machine can't solve. you can read this article and learn more. I hope it will help.
3. If you don't have a Time Machine backup yet, then your best option would probably be uFlysoft Data Recovery for mac software

Mac File Recovery How to Recover Lost Files from Emptied Mac Trash

Mar 09, 2011 | Apple Computers & Internet

1 Answer

Not enough free space


sounds like you are connecting your Archos to either a Mac or a Linux box. When you place items in trash they're actually placed in a hidden .trash folder on the Archos's internal drive and so still take up space.
Start by reconnecting the device to your computer and when it appears on your desktop try emptying your trash can/recycle bin, this will empty all .trash folders including the one on the Archos.
If you're using a Mac you may also want to use a 'clean eject' app such as FinderCleaner to remove all the Apple system files from your Archos. Don't worry the only effect this has is to slow reconnection down by 1 or 2 seconds but it helps prevent problems like this and prevent the device from getting confused by Apple system files.

May 08, 2008 | Archos Jukebox Recorder MP3 Player

Not finding what you are looking for?

820 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Loading...