How to Delete Files on Mac That Won't Delete
In this article
If you're trying to delete a file on your Mac and it won't budge—maybe you get an error message, the file reappears, or the delete option is greyed out—this guide walks you through every reliable fix. We'll cover common causes like locked files, permissions issues, and files in use, and give you step-by-step solutions that work on current versions of macOS (Ventura, Sonoma, and later). No special software is required, though you'll need your admin password for some steps.
What You'll Need
- Your Mac's admin username and password (for unlocking and permission changes).
- An external backup (Time Machine or similar) if the file is important—some fixes involve force-deleting.
- Patience: some methods require restarting your Mac or using Terminal commands.
Step-by-Step
Method 1: Quit the App Using the File
- If the file is open in an app, close it first. Check the Dock for apps with a dot underneath—that indicates they're running.
- Right-click the app icon in the Dock and choose Quit. If it won't quit, press Command+Option+Escape to open the Force Quit window, select the app, and click Force Quit.
- Try deleting the file again by dragging it to the Trash or right-clicking and selecting Move to Trash.
Method 2: Unlock the File
- Select the file in Finder.
- Press Command+I (or right-click and choose Get Info).
- In the Info window, look for the Locked checkbox. If it's checked, uncheck it.
- Close the Info window and try deleting the file again.
Method 3: Check Permissions
- Select the file and press Command+I to open Get Info.
- Scroll to the Sharing & Permissions section (click the arrow to expand if needed).
- Look at the Privilege column for your username. It should say Read & Write.
- If it says Read Only or No Access, click the lock icon in the bottom-right corner and enter your admin password.
- Change the privilege for your user to Read & Write.
- Close the Info window and try deleting again.
Method 4: Empty the Trash with Option Key
- If the file is in the Trash but won't delete, open the Trash.
- Hold the Option key on your keyboard. The Empty Trash button will change to Empty Trash Safely (or just Empty Trash with a different icon).
- Click it. This forces the Trash to empty even if some files are locked.
Method 5: Use Terminal (For Stubborn Files)
- Open Terminal (found in Applications/Utilities).
- Type
rm -rffollowed by a space, but do NOT press Enter yet. - Drag the file or folder from Finder into the Terminal window. This will fill in the full path.
- Press Enter. You may be asked for your admin password (you won't see characters as you type).
- This removes the file immediately, bypassing the Trash. Be absolutely sure you want to delete it permanently.
Method 6: Restart in Safe Mode
- Restart your Mac and hold the Shift key while it boots. Release when you see the login window.
- Log in (you may need to enter your password twice).
- Try deleting the file now. Safe Mode prevents some background processes from running, which may be holding the file.
- Restart normally afterward.
Method 7: Use Disk Utility First Aid
- Open Disk Utility (Applications/Utilities).
- Select your main startup disk (usually named "Macintosh HD").
- Click First Aid and then Run. Let it finish—this checks for disk errors that might prevent deletion.
- After it completes, try deleting the file again.
Common Mistakes
- Not quitting background apps: A file might be in use by an app that isn't visible, like a helper or agent. Check Activity Monitor for processes that might be using the file.
- Deleting files in iCloud Drive: If the file is in iCloud Drive, it may be downloading or syncing. Wait for the sync to finish, or turn off iCloud Drive temporarily in System Settings > Apple ID > iCloud.
- Using "rm" without proper path: A typo in the Terminal command can delete the wrong file. Always drag the file into Terminal to get the exact path.
- Forgetting to unlock the parent folder: If a folder is locked, you can't delete files inside it. Check the folder's Get Info as well.
Tips
- Use "Put Back" carefully: If you accidentally delete a file, you can right-click in the Trash and choose Put Back to restore it to its original location.
- Check for malware: Some stubborn files are created by adware or malware. If you notice suspicious files, run a malware scan with a trusted tool.
- Keep a backup: Before using Terminal to force-delete, make sure you don't need the file. Once it's gone, it's gone.
- Empty Trash regularly: Files that are in the Trash can sometimes cause issues. Empty it regularly to avoid buildup.
Troubleshooting
If the file still won't delete after all methods:
- Check for macOS updates: Go to System Settings > General > Software Update. Sometimes bugs are fixed in updates.
- Create a new admin account: If your user account has corrupted permissions, create a new admin account (System Settings > Users & Groups), log into it, and try deleting the file from there.
- Use "Get Info" on the parent folder: Sometimes the folder itself is locked or has restrictive permissions. Apply the same unlocking and permission steps to the folder.
- Boot into Recovery Mode: Restart and hold Command+R. Open Terminal from the Utilities menu and use
rm -rfon the file. This bypasses your normal system entirely. - If the file is in /Library or /System: These are protected by System Integrity Protection (SIP). You may need to disable SIP (not recommended) or use a third-party uninstaller designed for system files.
Frequently Asked Questions
Why does my Mac say "The operation can't be completed because the item is in use"?
This means an app or system process is currently using the file. Quit all apps, and if that fails, use Activity Monitor to find and quit the process. A restart usually clears it.
Can I force delete a file with Terminal?
Yes, the rm -rf command permanently deletes files, bypassing the Trash. Use it with extreme caution—there's no undo.
Why does a file keep reappearing after I delete it?
This often happens with files synced from iCloud Drive or other cloud services. The cloud service re-downloads the file. Turn off syncing for that folder or delete it from the cloud service's website.
What does "You don't have permission to delete" mean?
It means your user account doesn't have write access to that file or its folder. Use Get Info to change permissions, or log in as an admin to do so.
Is it safe to use "Empty Trash Safely"?
Yes, the Option-key method is safe—it just forces the Trash to empty even if some items are locked. It's a standard macOS feature.
What if the file is on an external drive and won't delete?
Try ejecting and reconnecting the drive, then delete. If that fails, the drive may have errors—run First Aid on it. If the drive is formatted as NTFS (Windows), macOS can't write to it; you'll need to use a Windows computer or a third-party NTFS driver.