Delete Files and Folders on Mac: 6 Ways
In this article
Deleting files and folders on a Mac is done by moving them to the Trash, then emptying the Trash, or by using keyboard shortcuts for immediate removal. This guide covers all the built-in methods, including right-click, keyboard, Finder, and Terminal options, plus what to do when a file won't delete.
How Deletion Works on macOS
Unlike some operating systems, macOS doesn't erase a file the moment you press Delete. Instead, the file is moved to the Trash, a special folder that holds deleted items until you empty it. This two-step system is a safety net: you can recover a file from the Trash if you change your mind. Emptying the Trash permanently removes the file's data from your drive, though recovery software may still find remnants until the space is overwritten.
You can delete files from the Finder, the Desktop, the Dock, or within apps. The method you choose depends on whether you want the safety of the Trash or need to bypass it entirely.
Method 1: Drag to Trash
The simplest way is to click and drag the file or folder onto the Trash icon in the Dock. The icon darkens when you're over it. Release the mouse to drop it in. This works for any item you can see in the Finder or on the Desktop.
To delete multiple items at once, select them all first: click one, then hold Command and click others to select non-adjacent items, or hold Shift to select a range. Then drag any one of the selected items to the Trash.
Method 2: Right-Click and Move to Trash
Right-click (or Control-click) on the file or folder and choose Move to Trash from the context menu. This is often faster than dragging, especially when the Trash icon isn't visible or you're working in a crowded window. The same menu also offers Put Back if the item is already in the Trash, which restores it to its original location.
Method 3: Keyboard Shortcuts
Select the file or folder, then press Command + Delete to move it to the Trash. To permanently delete without sending to Trash, press Option + Command + Delete. A warning dialog appears asking you to confirm; click Delete to proceed. This bypasses the Trash entirely, so use it only when you're certain.
You can also empty the Trash with Shift + Command + Delete, or Option + Shift + Command + Delete to empty it without the confirmation dialog.
Method 4: Empty the Trash
When you're ready to free up disk space, empty the Trash. Right-click the Trash icon in the Dock and select Empty Trash, or open the Trash window (click the icon) and click the Empty button in the top-right corner. macOS will ask for confirmation unless you've disabled that setting in Finder > Settings > Advanced.
To remove only specific items from the Trash, open it, right-click the item, and choose Delete Immediately. This is useful when you want to keep most of the Trash but permanently remove one large file.
Method 5: Delete in the Terminal
For power users, the Terminal command rm deletes files and folders without moving them to Trash. The command is rm file.txt for a file, and rm -r folder for a folder (the -r flag means recursive, deleting the folder and everything inside it). Be extremely careful: there is no undo and no Trash. A safer alternative is the trash command, which moves items to Trash, but it's not built-in and requires installation via a package manager.
What to Do When a File Won't Delete
Sometimes macOS refuses to delete a file. Common causes and fixes:
- File is in use: Close the app that has the file open. If it's a system process, try logging out and back in.
- Permissions: Right-click the file, choose Get Info, and check the Sharing & Permissions section. Change your access to Read & Write if you're the owner.
- File is locked: In Get Info, uncheck the Locked checkbox, then try again.
- App is running: Use Activity Monitor to quit a stuck app that might be using the file.
- Restart: A simple restart often releases file locks and allows deletion.
If none of these work, the file may be protected by macOS System Integrity Protection (SIP). You can't delete those files without disabling SIP, which is not recommended for most users.
Recovering Deleted Files
If you accidentally delete a file, check the Trash first. Right-click the item and choose Put Back to restore it to its original folder. If you've already emptied the Trash, you may still recover the file from a Time Machine backup: open the folder where it was, enter Time Machine, and browse to a version before deletion. Third-party recovery tools exist, but their success rate drops the longer you wait and the more you use the drive.
Frequently Asked Questions
How do I delete files on a Mac without dragging to Trash?
Select the file and press Command + Delete. That moves it to Trash without dragging. To permanently delete, press Option + Command + Delete and confirm.
Why can't I empty the Trash?
An item in the Trash may be in use by a running app. Quit the app, then try again. If that fails, restart your Mac. You can also right-click the Trash icon and choose Empty Trash while holding Option to skip the confirmation.
Does emptying the Trash permanently delete files?
Yes, it removes them from your drive's file system. However, the raw data may remain on the disk until overwritten by new files. For sensitive data, use Finder's Secure Empty Trash feature, which overwrites the data (available on older macOS versions; newer versions rely on FileVault encryption).
How do I delete files on an external drive?
Drag them to the Trash or use Command+Delete. The Trash will show a warning that the item is on an external volume. Emptying the Trash will delete it from that drive. Note that if the external drive is formatted for Windows (exFAT or FAT32), you can still use the Trash, but the file may not go to a hidden Trash folder on the drive; it's deleted immediately.
Can I undo a delete on a Mac?
If you just moved a file to Trash, press Command + Z in the Finder to put it back. If you emptied the Trash, you can't undo it directly, but you can restore from Time Machine if you have backups enabled.
What is the difference between Delete and Option+Delete?
Delete moves the file to the Trash, which you can recover later. Option+Delete bypasses the Trash and permanently removes the file immediately, showing a confirmation dialog. Use Option+Delete only when you're absolutely sure you won't need the file again.