Have you ever tried to drag a file to your Mac’s Trash, only to receive an error message? Maybe the file is in use, locked, or you don’t have permission to edit the file in question. Here we cover all the ways you can delete files on your Mac that won’t delete and refuse to get in the bin.
1. An application is using this file
You cannot delete a file if an application is using it! If your Mac is displaying the “file in use” error, you need to figure out which application has a hold over the file and close that application.
If you only have a handful of applications open, this may be as simple as shuffling through the various application windows. Alternatively, you can see a list of all active applications in the “Force Quit” window:
1. Click the “Apple” logo in your Mac’s menu bar.
2. Select “Force Quit.”
You can now review all the applications that are running on your Mac.
If you spot an application that could be responsible for the “File in use” error, you can close that application normally. Alternatively, you can select the application in the “Force Quit” popup and then click the “Force Quit” button. Note that if you opt for the latter, you’ll lose any unsaved work within the application.
Once you’ve closed the offending application, try deleting the file again. It should now vanish without any issue!
2. The file is locked
When a file is locked, you’re unable to make any changes to that file. This includes deleting it.
You’ll need to unlock this file before deleting it:
1. Control-click the file you want to unlock.
2. Select “Get Info.”
3. Click to expand the “General” section.
4. Find the “Locked” checkbox and deselect it.
Alternatively, you can unlock a file using your Mac’s Terminal.
1. Open the Terminal (Applications -> Utilities -> Terminal). In the Terminal window, type the following command:
This file should now be unlocked, and you can go ahead and delete the file, as normal.
3. You don’t have permission to edit the file
Sometimes you may hit the “Delete” key only to encounter a “You don’t have permission to edit this file” message.
Thankfully, you can give yourself permission:
1. Control-click the file in question.
2. Select “Get Info.”
3. Click to expand the “Sharing & Permissions” section. You’ll see a list of all the user accounts registered with your Mac.
4. To give yourself permission to edit this file, click the little padlock icon.
5. When prompted, enter your username and password.
6. Find your username in the list, click the accompanying set of arrows, and then select “Read & Write.”
You should now have permission to edit this file, including dragging it to the Trash!
4. None of the above fixes work? Try Force Delete
If all else fails, you can force-delete the file using a Terminal command. Just be aware that force-delete doesn’t send the file to the Trash – it permanently and immediately deletes the file in question. If you realize you’ve made a terrible mistake, there’s no way to recover the file.
This technique can also delete files you wouldn’t normally be able to delete – and sometimes Apple has a very good reason for protecting certain files! Force-delete is a useful technique but should be used with caution.
To force-delete a file, open your Mac’s Terminal (Applications -> Utilities -> Terminal) and type the following command:
Taking out the Trash
Have you managed to banish a file to the Trash, but now it’s stuck there, refusing to let go?
If you’re getting an error message every time you try to empty the Trash, there are a few tricks you can try.
1. Close all applications
An application may be using one of the files inside your Mac’s Trash.
You can resolve this issue by selecting the “Apple” logo in your Mac’s menu bar, choosing “Force Quit … ” and then closing the application in question.
If you’re unsure which application is interfering with the “Empty Trash” command, you can always restart your Mac, which will close all applications.
When your Mac restarts, make sure you empty the Trash before launching any applications!
2. Make sure all files are unlocked
If the Trash contains a file that’s locked, then this can prevent you from emptying the Trash successfully.
If the Trash only contains a handful of files, you may be able to check each of these files manually by Control-clicking each file and then selecting “Get Info.” If you discover a locked file, you can unlock it using the steps listed earlier in this article.
3. Force-delete stubborn files
If you suspect that a particular file may be preventing you from emptying the Trash, you can forcefully delete this file while it’s inside the Trash:
1. Open your Mac’s Trash.
2. Ctrl + click the file you believe may be causing the problem.
3. Select “Delete Immediately.”
Rinse and repeat for any other files you believe may be affecting your ability to empty the Trash.
Now that you have successfully deleted a file that won’t delete initially, it is good to delete an autosave file version to free up storage space. You should also locate and delete duplicate files on your Mac.