In this article you will find the following:
Are there files on your Mac you’re unable to delete? Before attempting to move the files to Trash, ensure that they’re unlocked:
- Select the files and click on File in the menu bar
- From the dropdown menu, choose Get Info
- In the Info window that appears, locate the Locked checkbox and deselect it. By doing so, you will change the file permissions to Read & Write, granting you the necessary privileges to delete the files.
When it’s done, right-click on it and select Move to Bin.
Failed? Whether it's due to locked permissions, system restrictions, or files being in use, the inability to delete a file on Mac can hinder your productivity and take up valuable storage space. We know how frustrating it can be to remove a locked file on Mac, but don’t worry, it’s pretty easy to solve. By following our few simple steps, you can regain control over these files, enabling you to delete them.
There are a few reasons why you might want to delete locked files:
- You need to clear up disk space
- You have files you no longer need
- You have copies elsewhere.
Before we start
While the instructions given by our team below will likely solve your locked file deletion issues, MacKeeper’s Safe Cleanup will make things much easier. It can help you remove pesky files from all over your system that are talking up valuable space and slowing down your Mac.
To use MacKeeper’s Safe Cleanup:
- Download MacKeeper and install it
- Open the Safe Cleanup tool located on the left panel
- Click on Start Scan and wait until it’s finished
- Now find the files you wish to delete.
If you find that you're still unable to delete the files after unlocking them, don't worry. We know a few working methods to address this issue. Continue reading for a comprehensive rundown on how to successfully unlock and delete your locked files.
How to unlock and delete a locked file using Finder
Finder is your Mac’s file management tool on OS X that makes it super easy to help you locate, organise, and manage files and folders. If you’re unable to locate your file, you can use the Search function in the top right of the window, which looks like a magnifying glass.
Here’s how to unlock locked files on Mac:
- Locate the locked file on your Mac and select it
- Right click (or Control-click) on the file and select Get Info from the dropdown menu
- In the Info window that appears, look for the Lock icon in the bottom right corner. Click on it to remove the lock
- You may need to enter your administrator password or provide Touch ID/Face ID authentication
- Now that the lock is removed, close the Info window
- Drag your file to Trash (or Bin depending on your country). To empty it, simply right click on Trash/Bin and click Empty Trash/Bin.
Get rid of locked files on Mac with the Terminal
If you’re still having trouble deleting locked files, it may be that they’re in use. To identify these applications, follow these steps:
- Launch the Terminal application on your Mac by going to Applications > Utilities > Terminal
- Enter the following command in the Terminal, but do not press the 'Enter' key yet: lsof
- Open the Bin/Trash, locate the item you wish to delete, and drag and drop it into the Terminal window. You can also get file path on Mac but let’s keep it simple
- Press the Enter key on your keyboard
- The Terminal will display a list of all the apps and processes using the file. You should close each item on this list.
Normally, closing an application should be straightforward. However, if an application refuses to close, you may need to force quit it:
- Click the Apple logo in the Mac's menu bar
- Select Force Quit
- Choose the application that isn’t closing
- Click Force Quit.
Once you’ve closed all the applications and processes associated with the file, you should be able to delete it normally.
Why you can’t delete locked files on your Mac
There are various reasons why you may not be able to delete files on your Mac, and unless you’re an expert, things can get pretty confusing. Here’s some why-s you may be running into trouble.
- Permissions: The file may have restricted permissions set, which prevents regular users from modifying or deleting it. Only users with appropriate permissions, such as the file owner or an administrator, can modify or delete locked files
- System Integrity Protection (SIP): SIP is a security feature on macOS that protects critical system files from unauthorised modifications. Some files are protected by SIP, making them locked and preventing deletion even for administrators
- File in use: If the file is currently in use by an application or process, macOS locks it to prevent accidental modifications or deletion. The operating system ensures that files in use aren’t deleted, as it may lead to data loss or application instability
- System files: Certain system files are essential for the functioning of macOS, and they’re locked to maintain system stability and prevent accidental deletion or corruption. Deleting these files can cause severe issues and may render the system inoperable.
Mission Accomplished!
Dealing with locked files on a MacOS can be frustrating, especially when you need to delete them to free up disk space. However, with a few straight forwarded instructions, you can reclaim control over these files and delete them successfully. By unlocking the files through the Finder or using Terminal to identify and close the applications or processes using the files, you can overcome the limitations imposed by file locks.
Our team would like to warn you that you may be required to fix a corrupted file, or files may have restricted permissions, or be protected by system integrity features, making them difficult to delete. Exercise caution when modifying system files to avoid any adverse effects on the system's stability. With the right approach, you can effectively manage and delete locked files on your Mac.
If all else fails or you need a quicker way to get rid of those pesky files, MacKeeper’s Safe Cleanup software is a perfect solution. Our tool will detect any junk files on your Apple computer and remove them in a click.