X

Deleting locked files

Locked files may not delete from your drive, which may be caused by standard file locking or from Windows-based locked files on FAT32 drives.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
2 min read

There are a couple of situations where files on drives may be locked, which will prevent them from being directly removed. As such, even though you have them in the trash and choose the option to empty the trash, the files will stay around and give an error that the files are locked.

In most cases, these are locks that are enabled in the Finder. If this is the case, you can press and hold options key when deleting, and the Finder will forcibly remove all files in the trash, regardless of whether or not they're locked. This will also delete other files without prompting, so be sure the files in the trash are those you want to delete before doing this.

FAT32 drives?

If you use an external drive that's formatted to FAT32, you may run into this problem if you have managed the files on it with a Windows machine. Windows file locks are not fully supported by OS X, and while they are recognized the system may not be able to reverse them. As such, your best option is to use a Windows machine (Boot Camp or Virtual Machines will do) to access the file and delete it or undo the lock.

Your second option is to reformat the drive, which you can do either with Disk Utility or with a Windows machine. To avoid these problems, you may think about using NTFS for the drive and installing an NTFS driver for OS X, a couple of which were outlined in this previous MacFixIt article.


Questions? Comments? Post them below!
Be sure to check us out on Twitter and the CNET Mac forums.