Deleting files on a Mac is straightforward: drag a file to the Trash, then empty the Trash, or right-click and choose “Move to Trash.” You can also select the file and press Command+Delete. This article covers every built-in method, how to permanently erase sensitive data, and what to do when a file refuses to delete.
Why Files Sometimes Won’t Delete
macOS locks files that are in use, have restricted permissions, or are protected by System Integrity Protection (SIP). If you see “The operation can’t be completed because the item is in use,” the file is open in an app. Quit the app, then try again. If the file is locked (a small padlock icon in the Info window), select it and press Command+I, then uncheck “Locked.” For system files, SIP prevents even the administrator from deleting them—this is a safety feature, not a bug.
Method 1: Trash and Empty Trash
The Trash is a temporary holding area. Until you empty it, you can recover files. To delete:
- Drag the file to the Trash icon in the Dock.
- Right-click the file and choose “Move to Trash.”
- Select the file and press Command+Delete.
To permanently remove the file, right-click the Trash icon and select “Empty Trash,” or open Trash and click the Empty button. This is the standard method for most files.
Method 2: Secure Delete (Permanently Erase)
Emptying the Trash only marks the disk space as available; the data can still be recovered with special software. If you need to erase sensitive files so they can’t be recovered, use Finder’s “Secure Empty Trash” feature (in macOS 10.15 and earlier) or the srm command in Terminal (macOS 10.15 and earlier). In current macOS versions (11 and later), Apple removed these options because SSDs handle wear leveling, making secure deletion less effective. For modern Macs, the best approach is to encrypt your disk with FileVault (System Settings > Privacy & Security > FileVault) and then empty the Trash normally. Once encrypted, deleted files are nearly impossible to recover.
Method 3: Delete Files Permanently Without Trash
If you want to skip the Trash entirely, press Option+Command+Delete after selecting the file. macOS will ask for confirmation and then delete the file immediately, bypassing the Trash. Be careful—this is irreversible. This is useful for junk files you’re sure you don’t need.
Method 4: Delete Files in the Terminal
For advanced users, the Terminal command rm deletes files permanently without sending them to the Trash. For example, rm /path/to/file deletes a single file, and rm -r /path/to/folder deletes a folder and its contents. The -f flag forces deletion, ignoring permissions. This method is immediate and irreversible, so double-check the path before pressing Enter. You can also use rm -i to be prompted before each deletion.
Method 5: Delete Files in the Finder (Special Cases)
Some files are hidden or locked. To delete hidden files, press Command+Shift+. (period) in Finder to show hidden files, then delete them as usual. For files that are “in use,” close the app that’s using them. If that doesn’t work, restart your Mac and try again. If a file is corrupted, you may need to restart in Safe Mode (hold Shift during startup) and then delete it.
Method 6: Use Third-Party Apps
Apps like CleanMyMac X or DaisyDisk help you find and delete large or unnecessary files. They are not required for basic deletion but can help clean up system junk and orphaned files. Always download such apps from the Mac App Store or the developer’s official website to avoid malware.
Frequently Asked Questions
How do I recover a file I accidentally deleted from Trash?
If you haven’t emptied the Trash, open Trash, right-click the file, and choose “Put Back.” If you already emptied it, you can restore from a Time Machine backup if you have one. Open the folder where the file was, enter Time Machine, select a backup from before the deletion, and click Restore.
Why can’t I empty the Trash?
Sometimes a file in the Trash is in use or has corrupted permissions. Try restarting your Mac, then empty the Trash. If that fails, open Terminal and run rm -rf ~/.Trash/* to force-delete the contents. Be careful—this permanently deletes everything in the Trash.
Does emptying the Trash permanently delete files on an SSD?
On modern Macs with SSDs, emptying the Trash makes the data unrecoverable by normal means, but forensic tools might still recover fragments. For sensitive data, enable FileVault encryption before deleting. That way, the data is encrypted, and even if recovered, it’s unreadable.
How do I delete files on iCloud Drive?
Files stored in iCloud Drive are deleted the same way as local files. Move them to Trash, then empty the Trash. Note that deleting a file from iCloud Drive deletes it on all your devices. To avoid this, use “Remove Download” to keep it in iCloud but free up local space.
What is the difference between “Move to Trash” and “Delete Immediately”?
“Move to Trash” sends the file to the Trash, where you can recover it later. “Delete Immediately” (Option+Command+Delete) bypasses the Trash and permanently deletes the file right away, with a confirmation dialog. Use the latter only when you’re absolutely sure.
Can I delete system files to free up space?
You can delete some system files (like old logs or caches) but avoid deleting files in /System, /Library, or /Applications that you didn’t install. Use the “Storage” section in System Settings to see what’s taking up space. For most users, the safest way to free space is to delete large files in your user folder, not system files.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Mac Start Up Automatically After Power Failure?
- Expose Self-Hosted Service Securely Without Cloudflare Tunnel
- Nano Delivery for Functional Foods: What It Can and Can’t Do4.00
- Disable Apple Watch Turn-by-Turn Vibration While Driving
- Convert Play FLAC in iTunes: Full Guide
- Soda Foundation Charter: What It Means