How to Delete Locked Files on a Mac

Method 1 of 3:

Using Secure Empty Trash

  1. How to Delete Locked Files on a Mac Picture 1
    Know the difference between trash and 'secure' trash. Secure Empty Trash is a security measure designed by Apple to make sure sensitive files have their indexing removed from the hard drive and the space they occupied overwritten. Due to the way solid state hard drives store data, this method is less reliable on solid state drives, and thus is being phased out by Apple.
    1. The Secure Empty Trash option has been removed in OSX 10.11+.
  2. How to Delete Locked Files on a Mac Picture 2
    Trash the file. Drag the locked file into the trash.
  3. How to Delete Locked Files on a Mac Picture 3
    Empty the trash securely. Open the trash in the finder and select 'File > Secure Empty Trash'. You can also access this with 'Ctrl + click > Secure Empty Trash'. The file should delete without error.
    EXPERT TIP
    How to Delete Locked Files on a Mac Picture 4

    Gonzalo Martinez

    Apple Repair Specialist & President, CleverTech
    Gonzalo Martinez is the President of CleverTech, a tech repair business in San Jose, California founded in 2014. CleverTech LLC specializes in repairing Apple products. CleverTech pursues environmental responsibility by recycling aluminum, display assemblies, and the micro components on motherboards to reuse for future repairs. On average, they save 2 lbs - 3 lbs more electronic waste daily than the average computer repair store.
    How to Delete Locked Files on a Mac Picture 5
    Gonzalo Martinez
    Apple Repair Specialist & President, CleverTech

    Another option is using the application App Cleaner. If you don't use secure delete, you can drop your application onto App Cleaner, which will search all the connected files and remove them. For example, you can remove apps like Microsoft Word and all their data by dragging the application onto App Cleaner.

Method 2 of 3:

Altering File Permissions

  1. How to Delete Locked Files on a Mac Picture 6
    Check the file's lock status. Select the file, go to 'File > Get Info'. A checkbox labeled 'Locked' will tell you the file's current status. If the box is not greyed out, simply uncheck the box and try deleting the file again. If the box is greyed out it means you do not have the proper permissions for the file.
  2. How to Delete Locked Files on a Mac Picture 7
    Access the inspector. Press and hold Option and go to 'File > Show Inspector' (holding the options key will change 'Get Info' into 'Show Inspector' in the menu). In this menu press the triangle next to 'Ownership and Permissions' to expand.
  3. How to Delete Locked Files on a Mac Picture 8
    Unlock the options. From here you can view the file permissions, but to change them you need to press the lock icon. This will prompt you for your administrator password.
  4. How to Delete Locked Files on a Mac Picture 9
    Change the permissions for unlocking. Press 'You Can' and select the option 'Read and Write'. With this change the checkbox next to 'Locked' should no longer be inaccessible. Deselect the checkbox and delete the file like normal.
Method 3 of 3:

Using the Terminal

  1. How to Delete Locked Files on a Mac Picture 10
    Launch the terminal. 'Go to Applications > Utilities > Terminal' to open. The terminal allows you to execute commands to the operating system with code. The 'sudo' tag is used to grant root access. After entering a command with it, you may be prompted for your account's administrator password to proceed with the command.
  2. How to Delete Locked Files on a Mac Picture 11
    Change the lock status. Enter 'sudo chflags nouchg [path to the file]'. This should force toggle the files locked status.
    1. For example: 'sudo chflags nouchg ~/Applications/Microsoft Word/test.doc'.
    2. You can also drag and drop the target file in the terminal window to automatically enter the file path.
  3. How to Delete Locked Files on a Mac Picture 12
    Force delete the file. If all else fails, another terminal command can force file deletion. Enter 'sudo rm -r [path to the file]'. In most cases, this command will delete the file once granted administrator permission with the password.
3.5 ★ | 2 Vote

May be interested

  • How to delete 'iOS Files' which is taking up your Mac's memory?How to delete 'iOS Files' which is taking up your Mac's memory?
    do you have some mysterious 'ios files' taking up too much of your valuable mac memory? maybe you do not need them anymore, the article below helps you completely eliminate those files.
  • Guide to delete files not to delete, fix errors when deleting filesGuide to delete files not to delete, fix errors when deleting files
    instructions for deleting files from deleting and fixing errors when deleting files - there are many cases when you want to delete a file, but even after turning off its operation, you still cannot delete it by normal deletion methods.
  • 'Unlock' file in Windows'Unlock' file in Windows
    suppose you want to edit a file, you may want to name it, move it to another location or delete it completely. however, you have a problem when editing, windows will notify you that another process has locked your file. so what to do?
  • How to delete files and folders on DropboxHow to delete files and folders on Dropbox
    after a long time using dropbox leads to more and more storage space on dropbox. you should clean up dropbox, delete files or folders that are no longer in use.
  • How to Delete Temporary Files and Delete Prefetch Files from Your ComputerHow to Delete Temporary Files and Delete Prefetch Files from Your Computer
    if you need to free up some space on your computer, you may be searching for files to delete. temp files are created when windows shuts down in an irregular way, and your computer doesn't need them to function, so these are good...
  • How to add trash to permanently delete files on Windows 10/11How to add trash to permanently delete files on Windows 10/11
    do you want a recycle bin on your windows 10 or 11 desktop that actually deletes files that are dragged into it and cannot be recovered? the good news is that you can do this using free file wiper and multi trash.
  • How to Delete Read-Only Files on LinuxHow to Delete Read-Only Files on Linux
    there are several ways to help you delete files read-only on linux. if it's a file you own, you can change the file permissions or use the sudo command to delete the original file. however, if you cannot delete files with write permissions (or see a 'read only file system' error message), you need to change the drive with the appropriate permissions. this article will show you how to delete read-only files on any linux distribution, including ubuntu and linux mint.
  • How to view recently deleted files on Windows 10?How to view recently deleted files on Windows 10?
    usually when you delete any file on a windows 10 computer by right-clicking on the file and selecting delete or selecting the file then pressing the delete key, then the file will be moved to recycle bin. or another way to permanently delete files is to press shift + delete, and windows will move these files from recycle bin.
  • How to Delete Undelete FilesHow to Delete Undelete Files
    this is an article showing how to delete regular files that cannot be deleted on your computer. in most cases, files that cannot be deleted are being used by some program or service; you can solve the problem by starting your computer in safe mode to stop most programs and services. if the file is corrupted or the computer reports that the file cannot be found, repairing the hard disk error may fix the problem. on android phones and tablets, you can use third-party apps to delete files. however, the article does not instruct on deleting system files, as this may cause the computer to crash.
  • How to batch delete files on Windows 10How to batch delete files on Windows 10
    deleting anything more than a few files with file explorer can become a lengthy process. when it comes to batch deletion of files on windows 10, you have a few options.