How to skip the trash and instantly delete files in os x
The latest versions of Mac OS X include a new ability to immediately delete a file or folder from the Mac, bypassing the Trash can. Essentially how the “Delete Immediately” feature works is by circumventing the Trash and rather than waiting for user action to remove the files, it just deletes the file(s) instantaneously from the Mac, making the delete immediately function faster than the typical manner of removing a file in Mac OS X.
Delete Immediately is a handy feature if you want to rid a file or folder from the Mac right away and without having to manually empty the Trash, it effectively skips the Trash function and just deletes the files. This is not intended to be a replacement for secure empty Trash, however and doesn’t offer the same rewrite function.
There are two ways to access and use Delete Immediately in Mac OS X, with a quick access keystroke and from the File menu.
There is no way to undo this action so only use Delete Immediately if you really truly do want to vanquish a file from the Mac.
How to Delete Files Immediately with a Keyboard Shortcut on Mac
The quickest way to access the Delete Immediately function in Mac OS X is through a keyboard shortcut:
- Select the file(s) or folder(s) you wish to instantly and permanently delete and hit the following keystroke sequence: Option + Command + Delete
- Confirm with the dialog that you wish to delete the files permanently and immediately
This just circumvents placing the files into the Trash, it deletes the file(s) immediately from the Mac.
How to Access Delete Immediately from Mac Finder
You can also access the Delete Immediately option and skip the Trash by using the File menu in the Mac file system:
- Select the file(s) or folder(s) you wish to instantly and permanently delete then hold the OPTION key as you access the “File” menu from the Finder
- Choose “Delete Immediately” from the File menu
Again, this skips the Trash, and the files are instantly deleted. The same as using the keyboard shortcut.
Similar to using the Trash is that if a file is locked or in use the Trash action will be prevented, and if you encounter a “item can’t be moved” error, you’ll likely need to quit apps and relaunch the Finder first.
With the release of OS X El Capitan Mac users are as lucky as Windows users have been for a long time with missing neat feature finally coming to Macs. And by this i mean a shortcut option to instantly delete files without the need to move items to Trash first.
Deleting files on OS X has never been a particularly convenient process. But now OS X El Capitan features an ability to instantly delete files. In fact, there are 2 ways how you can skip Trash bin: through Finder, or through keyboard shortcut.
Method 1: Finder
Let’s say you have some files you want to delete. First locate and select them in Finder, now choose File and look for an option Move to Trash. Hover your mouse over Move to Trash and press Option key on your keyboard. You will see Delete Immediately option appearing where normally you would see Move to Trash.
Method 2: Shortcut
Those attentive must have already spotted that shortcut in Finder to immediately delete file. You can simply employ Option+Command+Delete shortcut earlier unavailable on all OS X prior to El Capitan.
Whichever method you prefer, you will still need to confirm you want to delete the items with the resulting sample dialog:
No doubt you can still go old-fashioned way deleting items through moving to trash, however to speed things up why not try this marvelous shortcut and join the new era for Mac users. Let’s be frank you never check Trash Bin before emptying it, so then why even bother with filling it.
Lana Y. writes in with a problem related to getting rid of files in OS X. Like many people, she wants to use Trash as a way station and then opt to empty trash later. Instead, she notes (along with the screen captures below):
My files are deleted immediately, without possibility to access them in Trash. I tried to change the privileges and tried to find Trash in terminal. Nothing helps.
This is a common and frustrating problem, and Lana isn’t alone. The file permissions associated with trash are out of whack, making it impossible for OS X to write new files to the Trash folder, and OS X doesn’t have a friendly way to repair it, even though your Mac knows enough that it can’t write to the folder! (OS X could note the problem and ask a user, “There’s something wrong with your Trash, which prevents files from being put there. Would you like to repair it?” as one possibility. OS X notices similar other problems.)
The underlying Unix directory for files en route to deletion isn’t global but is located in each user’s home directory. This is transparent to you when using OS X unless the permissions for the directory become messed up. In that case, because OS X can’t move the items you want to delete into this temporary location, you’re prompted to delete files or folders immediately. (You’ll see this warning when deleting files from mounted fileservers, too, for the same reason.)
You can solve this via the Terminal although you need to be even more careful than usual in entering a command there, as you could delete other files if you don’t copy and paste (or, type in) the exact sequence—it won’t just fail, but could delete parts of your drive.
With that warning in place, follow these steps when logged into your account, which has to have administrative privileges for this to work:
Launch Application > Terminal.
At the command prompt type (or, preferably, copy and paste): sudo rm -ri
You should first be prompted for your account’s password; enter it, and press return.
You should next be prompted to remove any files and folders in the .Trash folder, followed by the .Trash folder itself. Type yes and return at each prompt. (This is a great place to notice if you’ve entered anything incorrectly above, too, and to press Control-C to halt the removal if you have.)
Log out of your OS X account ( > Log Out [user name], which closes all programs) and log back in. The problem should be solved, as OS X will create a new .Trash folder with the correct permissions.
(If you like to live dangerously, use the command sudo rm -rf
/.Trash instead to bypass being prompted to delete each file or folder. But I warned you.)
If you continue to have problems, you may have permissions problems on mounted drives. You can repeat the above operation for each volume, which contains a hidden top-level .Trashes folder with separate folders for each user in OS X.
In step 3, instead of
/.Trash , you use each volume’s name instead. In OS X, you can type df -H to find the names of each volume, which are listed under a Mounted On column in form /Volumes/ plus the drive’s name.
Unix doesn’t recognize spaces in names as part of the name unless they’re handled carefully, by putting a backslash in front of them, such as /Volumes/My Main Backup Drive . You can avoid having to do this formatting by dragging the volume in question into the Terminal window after entering the command for step 2:
Type sudo rm -ri plus a space.
Drag the volume onto the Terminal window, and it inserts the properly formatted volume name.
Now press Delete to remove a space after the drive’s name that’s automatically inserted, and add /.Trashes
Now log out of your account and back in, and you should have your Trash folder restored to normal. (If you’d like to be able to delete immediately, see my December 2015 column on using that function intentionally.)
Not every file you get rid of on your Mac needs to go to the Trash folder. Using Trash is handy just in case you want to get a file back. But, if you know for certain that you want to permanently delete a file and do so right away, why bother sending it to Trash?
Here’s how to skip the Trash and delete files on your Mac immediately.
Delete files on Mac with a keyboard shortcut
One quick and easy way to permanently delete files is with a keyboard shortcut. This lets you remove the file by tapping a few keys on the keyboard.
1) Select the file you want to delete, whether in a folder or on your desktop.
2) Hit Option + Command + Delete .
You’ll then see a pop-up message confirming the action. Click Delete to confirm.
Delete files on Mac with the menu option
The second way you can immediately delete a file is by using the menu bar. And, this isn’t as obvious as it should be.
1) Select the file you want to delete.
2) Click File from the menu bar.
3) Hold down the Option key on your keyboard.
You will notice the options in that menu change slightly when you hold the Option key. Move to Trash changes to Delete Immediately. So, select that option and then confirm that you want to delete it in the pop-up box.
Wrapping it up
If you’re absolutely sure that you won’t want to restore a file from the Trash and would rather delete it immediately, you have these two convenient options. Which one are you going to use?
Need help removing other types of files on Mac? Check out how to get rid of files that won’t delete from your Trash or how to delete old email attachments to regain space.
My Question is I want to erase a file in OS X Securely (like the function of “Secure Empty Trash”) so that, the file cannot be recovered by using recovery tools. I don’t want to empty the trash. It is possible to erase Files Securely in OS X without moving the file to Trash ?
4 Answers 4
You can always use the terminal command rm with the -P option:
[Option -P will] Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted.
If you’re not handy with the Terminal, just:
- Open the Terminal.app (Found in /Applications/Utilities).
- Type cd and drag the folder which contains the file you want to delete, to the terminal window.
- Type rm -P FileName.extension and hit Enter
srm is another shell utility for deleting files securely. It uses the 35-pass Gutmann algorithm by default, but -s (overwriting files with random data once) is faster and should be secure enough for most purposes.
If you want to make sure that your files, deleted or otherwise, cannot be recovered, just turn on FileVault to encrypt your disk.
Multiple erases or writes on SSDs do not make the file "more" erased.
(I realise this is an old question.)
The securely delete command overwritten the areas on the storage medium. In OS X El Capitan 10.11 it was still accessible via the terminal. It was called srm – and has disappeared since macOS Sierra 10.11
The -P option ensures that when deleting the memory areas are overwritten three times before the memory space is released. For example, rm -P Desktop/File.txt deletes the file File.txt from the desktop. The additional option -R also removes folder contents and subfolders (as well as their contents)
Deletes folders and their contents. To avoid typing errors, enter rm -RP including a space at the end.
You know the drill: when you want to delete a file on your Mac, you have to move it to the trash can sitting in the Dock (or select the file and press Command + Delete). Once in the trash, you must empty the trash for OS X to begin reclaiming the drive space. But no longer. Now you can skip the trash entirely and delete a file on the spot in OS X 10.11 (El Capitan). Continue reading and we’ll show you how it’s done.
A new feature in OS X El Capitan lets you skip the trash when deleting files from the Finder. It’s a relatively easy process.
1. Open a Finder window.
2. Select the file you wish to delete.
3. Hold down the Option key on your keyboard.
4. Move your cursor to the menu bar and click File > Delete Immediately.
5. Agree to the confirmation dialog that appears letting you know this action cannot be undone.
That’s it! The file you selected will be removed in one go. However, if you want to make the process go even faster you’ll want to use the keyboard shortcut instead. Pressing Option + Command + Delete when a file is selected will perform the same action.
Sign up to get breaking news, reviews, opinion, analysis and more, plus the hottest tech deals!
Thank you for signing up to TechRadar. You will receive a verification email shortly.
I frequently connect different external USB hard drives and flash drives to my computer and I would like to facilitate deleting files and regaining disk space from them.
If I simply delete the file, it will be kept in a hidden trash folder on the external drive until I empty the Trash. This also forces me to empty my local trash simultaneously while the external disk is still connected to regain the disk space, which is undesirable.
At the moment, the only other “solution” I’ve found is moving the file to the internal hard drive and then trash it. This is not optimal because I waste time moving files from one drive to another (I regularly deal with 20GB+ VMs).
How can I permanently delete a file from an external drive, bypassing the trash?
9 Answers 9
⌘ Command ⌥ Option ⌫ Delete will permanently delete files, with a confirmation dialog warning that this action can not be undone. ⌘Command ⌫ Delete simply moves files to Trash, without confirmation.
Tip: whenever you want Mac app to do the same action but a little differently, try doing it with ⌥ Option button pressed.
You can create an Automator service or application to facilitate executing the rm shell commando, which will permanently delete files or folders and skip the trash.
For example, start with creating a new Service in Automator.app.
- Select files or folders as input, you probably also want to limit the availability of this service to the Finder app.
- Optionally, but highly recommended, first add an Ask for Confirmation step to the workflow.
Finally, add the Run Shell Script step to the workflow. Make sure to pass input as arguments . Then you can put in the following script:
As mentioned by @Thecafremo, you can also add a -P parameter to rm for additional security while deleting. For an extra nicety, you can add some audible feedback by adding the following command at the end of the shell script:
Save your service, and it should be ready to use in Finder from the Services menu in the menu bar. The service will also appear at the bottom of the menu you get by right clicking on files in Finder, although to make it appear there you may have to run it once from the Finder > Services menu first. You can also configure a keyboard shortcut to your service in the Keyboard preference pane of System Preferences.
Instead of creating a service, you could similarly create an application in Automator, which you can pin in the Dock so you can drag files to it.
Is there a way to completely remove files from my system without moving them to the Trash?
I’ve read about the Trash, but I’m not clear on EXACTLY how it works. Can I empty A file from the trash or when I click on a file & choose “Emtpy the Trash” does it empty ALL of the files in the Trash or just that one file?
Is there a way to just empty ONLY 1 file from the trash or restore ONLY 1 file from the Trash if so how?
ALSO, what are the “rules” for MOVING files rather than COPYing them? I thought files that went from one folder to another on the same drive, were moved & ones that went to different drives were copied. It seems like I’ve run acrorss instances where that’s not how things work.
Mac Pro, Mac OS X (10.6.8)
Posted on May 5, 2012 9:16 AM
Helpful answers
You can delete files immediately with Terminal:
rm -f (drag file to Terminal window, press return)
To delete folders and their contents:
rm -rf (drag folder to Terminal window, press return)
To restore a file from the Trash, just drag it out of the Trash. Or click it once and hit Command-Backspace. The file will be put back to whatever location it was in before it was in the Trash.
You are correct about moving vs. copying files. Dragging a file from one volume (i.e. disk) to another will make a copy of it. Dragging a file from one location to another on the same volume will move it, except when the user permissions do not allow the original file to be moved (such as applications or system files). Then a copy will be made.
To delete a single item from the Trash, move everything out of the Trash that you don’t want deleted, and then empty the Trash. Don’t put files in the Trash that you are wanting to keep. Create a “purgatory” folder to stash files that you think you no longer want but can’t bring yourself to delete just yet.
May 5, 2012 11:44 AM
Kurt, some good keyboard acrobatics needed for that maneuver. But no problem for any virtuoso pianist who can span three octaves with one hand. 😉
Nah! It’s very easy. Left index finger on the left Command key, right hand on on the backspace key. Press. That moves everything into the trash. With your left index finger already on the Command key, it’s a very quick move to just add the Option key with the middle finger, and the Shift key with the third finger since they’re already basically hovering over those keys. Right hand is already still over the Backspace key. Press again to empty the trash.
It sounds clumsy when you type out how to do it, but with just a little practice, you’d be surprised how fast it is. I t’wern’t kidding about doing both keystrokes in one second. 🙂
May 5, 2012 12:13 PM
There’s more to the conversation
Loading page content
Page content loaded
To delete a file or folder without moving it to the Trash, open Terminal in Applications>Utilities and copy/paste
Then, important, leave a space after the -rf and drag the file or folder into the Terminal window — it will then appear with the path of that file or folder — and hit return. You will be asked for your admin password — nothing will appear as you type it in — and given a warning about using the sudo command, if this is the first time using sudo.
Note: the rm command, especially run with sudo (sudo gives you root access) is a very dangerous command; it must be used with great care. No second chances.
You cannot selectively empty the Trash. It’s all or nothing. If you want to Trash a single file or folder, then move all the other ones you don’t want to empty out of the Trash.
AFAIK, dragging a file from one volume or drive to another should leave the original in place and move a copy over. I’ve never heard of any exceptions. However, if you are dragging a file or folder over using the Finder, I don’t think the Permissions for the copy will necessarily be preserved, except for files or folders moved within your user, where your user is already the owner. Even within your user, the owner may be changed to your user, even if you are not the owner.
Outside of your user, the permissions will be changed to reflect your user as owner, which will be wrong. So it’s not a great way to copy over anything from /Library or /System/Library using the Finder, where the owner should be system or root, or other, not your user. If you do this, it’s probably then a good idea to repair Permissions, so they are restored properly. That said, Permissions repair will not touch anything in your user.
Although this might seem like a very simple issue, not everyone knows how to get around using Mac OS. Sometimes first time Mac users will have a hard time getting around the interface and even deleting and recovering some of their files. With this in mind, it would be nice if first time Mac OS X users have a better time using the trash folder on Mac.
This article will focus on getting first time Mac OS X users to properly use Mac’s trash folder such as deleting files, managing trash, recovering accidentally deleted files, and other issues you might face.
- What is The Trash Folder in Mac OS X?
- How Do I Find The Trash folder on My Mac?
- How To Recover the Trash Bin on a Mac
- How To Empty The Trash on Mac
- How To Delete File(s) on Mac
- Related Posts
What is The Trash Folder in Mac OS X?
Before we move to do things with the trash folder like deleting files, recovering files, as well as shortcuts that will speed up your efficiency. But first, we have to understand what the trash folder is and why it’s very important.
So first of all, the trash folder is pretty self-explanatory from the name itself. It’s a container where you can dump files that you never need similar to how a trash can works. This makes it very useful for managing files that you no longer need.
So if you have especially large files on your Mac that you don’t need anymore or are simply taking up valuable space, then it’s a good idea to put them in the trash folder. And just like with a trash can, you have the option of throwing away all of the contents of the trash folder or you can also recover misplaced files in the first place.
Having the ability to freely delete files and put it back on your computer if you really need it makes the trash folder a very useful feature in Mac OS X which explains why it’s very important that you properly use it to your advantage.
How Do I Find The Trash folder on My Mac?
Now that you know what the trash folder is and why it’s so important, its time to figure out where it is located on your Mac. Thankfully Mac OS X has a very intuitive interface allowing even first-time users to easily get around.
The Trash folder on a Mac is located on the lower right side of your screen. And it’s easily distinguishable from the others since it has a trash can icon.
If for some reason the icon isn’t there, then there are other ways to access the trash folder. We suggest either using the terminal or search it via the inbuilt search function Mac has.
Using the Terminal to open Trash Folder
- Enter the terminal by pressing command and spacebar.
- Once in the terminal type “open.trash”
- This should open the trash folder
Using the search functions to open the trash folder
- From the toolbar, press Command+Shift+G
- A window will pop up where you can type what you’re looking for
- In this case, simply type “Trash” and it will give you access to the trash folder from there
Once inside the trash folder, you’ll be able to see all the deleted files inside the folder and you can choose to restore them or delete them permanently. Which brings us to the topic of recovering files.
How To Recover the Trash Bin on a Mac
Retrieving or recovering files that have been deleted is easy once you’re inside the trash folder. You can simply click on the file itself and drag it out of the folder. The file will be recovered and you can access it normally.
Another option that doesn’t require dragging is to highlight all of the files you wish to recover and right-click on them. When you right-click on these highlighted files a pop up will appear giving you several options. Choose the “Put Back ”option and these files will return to their previous state before they were deleted.
How To Empty The Trash on Mac
If you’re looking to empty the trash on a Mac, then there are many ways to do this. One simple way was already shown on the image above and it follows the same step as recovering the files. Simply right-click on the file toy want to permanently delete and click on the “empty trash option”.
How to Empty Trash Using The Icons
Another option to empty the trash is to go to the trash icon yourself and do it from there.
- Locate the trash icon on your Mac which is usually located on the lower right side of the screen. You can do this on the trash folder itself as well.
- Right-click on the icon and click on the trash can icon and click on the “Empty Trash” option.
- A prompt will ask you for confirmation. Agree to empty out the trash.
How to Empty Trash Using Shortcuts
If you find the steps above to be too tedious to empty the trash in a MacBook, then you can simply delete all of the files in the trash folder with a few buttons. Simply press “Command+Shift+Delete” and all of the files within the trash folder will be gone.
If you want to skip the prompt and delete the folder immediately deleted the folder then press, “Option + Shift + Command +Delete”. When you press this shortcut, Mac won’t prompt you or ask you for permission or a prompt if you’re sure. So try not to do this by accident since you might lose important files.
How To Delete File(s) on Mac
Now that you know how to permanently delete and recover files in the trash folder, you might still be wondering “How Do I delete files on a Mac in the first place?”
Well, there are 3 easy and convenient ways that you can do this:
By Dragging and Dropping The Files
The old fashioned way that people delete things is by selecting the files and dropping them off. It’s very similar to how you would do it in real life and although it’s a little inconvenient to do, some people enjoy doing this which explains why this is still an option for deleting files.
- Select the file or files that you want to delete.
- Drag them through the screen and drop them inside the trash folder.
- Your files will be considered deleted and they will disappear from their current folder.
By Right Clicking
If you find dragging and dropping files directly into the trash folder very tedious then you might want to use your mouse to right-click instead. It’s a little faster than dragging and dropping considering that you’re only going to click a few times to do this.
- Select the file or files that you want to delete.
- Right-click on the file or highlighted files and an option should come up
- Choose the “Move to Trash” option and click on it.
- A prompt should pop up asking to confirm your action. Agree to the prompt to delete the unwanted files.
Using Keyboard Shortcuts
Last but not least we have the keyboard shortcuts. This is probably the fastest way to delete your files since it doesn’t involve clicking on the trash icon as well as other options. As long as you know what you’re doing you can delete your files in a second. However, make sure to do the proper command because you might accidentally delete the whole folder if you’re not careful.