How to Delete a Locked File

This wikiHow teaches you how to delete a locked or otherwise restricted file on your Windows or Mac computer. You can use Safe Mode or an app called Process Explorer on Windows, while Mac users can either use the Get Info window to unlock...
Method 1 of 4:

Using Safe Mode on Windows

  1. How to Delete a Locked File Picture 1How to Delete a Locked File Picture 1
    Open Start
    How to Delete a Locked File Picture 2How to Delete a Locked File Picture 2
    . Click the Windows logo in the bottom-left corner of the screen.
  2. How to Delete a Locked File Picture 3How to Delete a Locked File Picture 3
    Open Settings
    How to Delete a Locked File Picture 4How to Delete a Locked File Picture 4
    . Click the gear-shaped icon in the lower-left side of the window.
  3. How to Delete a Locked File Picture 5How to Delete a Locked File Picture 5
    Click
    How to Delete a Locked File Picture 6How to Delete a Locked File Picture 6
    Update & Security. It's near the bottom of the Settings window.
  4. How to Delete a Locked File Picture 7How to Delete a Locked File Picture 7
    Click the Recovery tab. You'll find it on the left side of the window.
  5. How to Delete a Locked File Picture 8How to Delete a Locked File Picture 8
    Click Restart now. It's near the middle of the page. Doing so will restart your computer into the Advanced Options menu.
  6. How to Delete a Locked File Picture 9How to Delete a Locked File Picture 9
    Click Troubleshoot. This option is near the top of the screen.
  7. How to Delete a Locked File Picture 10How to Delete a Locked File Picture 10
    Click Advanced options. You'll find this in the middle of the screen.
  8. How to Delete a Locked File Picture 11How to Delete a Locked File Picture 11
    Click Startup settings. It's on the right side of the screen.
  9. How to Delete a Locked File Picture 12How to Delete a Locked File Picture 12
    Click Restart. This button is near the bottom of the screen.
  10. How to Delete a Locked File Picture 13How to Delete a Locked File Picture 13
    Select the "Enable Safe Mode" option. Press 4 or F4 on the "Startup Settings" window.
  11. How to Delete a Locked File Picture 14How to Delete a Locked File Picture 14
    Wait for Windows to finish restarting. If you use a password on your account, you'll need to select your account and enter the password before proceeding.
  12. How to Delete a Locked File Picture 15How to Delete a Locked File Picture 15
    Find your file. Open Start
    How to Delete a Locked File Picture 16How to Delete a Locked File Picture 16
    , open File Explorer
    How to Delete a Locked File Picture 17How to Delete a Locked File Picture 17
    , and locate the previously locked file.
  13. How to Delete a Locked File Picture 18How to Delete a Locked File Picture 18
    Delete the file. Click the previously locked file, click the Home tab, and click Delete in the toolbar that appears.
    1. Alternatively, you can click the file to select it and then press the Delete key.
  14. How to Delete a Locked File Picture 19How to Delete a Locked File Picture 19
    Empty the Recycle Bin. Double-click the Recycle Bin icon on your desktop, then click the Manage tab and click Empty Recycle Bin in the toolbar. Your file should be deleted.
    1. Once you've deleted your file, you can restart your computer to exit Safe Mode.
Method 2 of 4:

Using Process Explorer on Windows

  1. How to Delete a Locked File Picture 20How to Delete a Locked File Picture 20
    Open the locked file. In order for the file to show up in Process Explorer later, you'll need to have the locked file open.
    1. Simply double-clicking the file will be enough to place it in the "Running" category of your computer's Task Manager.
  2. How to Delete a Locked File Picture 21How to Delete a Locked File Picture 21
    Open the Process Explorer page. Go to https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer/ in your browser.[1]
    1. Process Explorer is an official Microsoft app.
  3. How to Delete a Locked File Picture 22How to Delete a Locked File Picture 22
    Click Download Process Explorer. This link is near the top of the page. Doing so will prompt the Process Explorer ZIP folder to download onto your computer.
  4. How to Delete a Locked File Picture 23How to Delete a Locked File Picture 23
    Open the ZIP folder. In your computer's download folder (e.g., the desktop or the Downloads folder), double-click the "ProcessExplorer.zip" folder to open it.
  5. How to Delete a Locked File Picture 24How to Delete a Locked File Picture 24
    Click the Extract tab. It's at the top of the window. A toolbar will appear at the top of the window.
  6. How to Delete a Locked File Picture 25How to Delete a Locked File Picture 25
    Click Extract all. You'll find this option in the Extract toolbar. Clicking it prompts a new window to open.
  7. How to Delete a Locked File Picture 26How to Delete a Locked File Picture 26
    Click Extract. It's in the bottom-right corner of the window. This will install the Process Explorer app and open its installation folder.
    1. By default, this will install the Process Explorer in its current download location.
    2. If you want to change the installation location, first click Browse... and select a new folder.
  8. How to Delete a Locked File Picture 27How to Delete a Locked File Picture 27
    Open Process Explorer. Double-click the procexp64 item in the folder if your computer uses a 64-bit processor.
    1. If your computer uses a 32-bit processor, you'll double-click procexp here instead.
  9. How to Delete a Locked File Picture 28How to Delete a Locked File Picture 28
    Click Agree when prompted. This will open the Process Explorer main window.
  10. How to Delete a Locked File Picture 29How to Delete a Locked File Picture 29
    Click File. It's in the top-left corner of the window. A drop-down menu will appear.
  11. How to Delete a Locked File Picture 30How to Delete a Locked File Picture 30
    Click Show Details for All Processes. This option is in the middle of the File drop-down menu.
  12. How to Delete a Locked File Picture 31How to Delete a Locked File Picture 31
    Click Yes when prompted. The Process Explorer window will close and re-open.
  13. How to Delete a Locked File Picture 32How to Delete a Locked File Picture 32
    Click Find. It's a tab at the top of the window.
  14. How to Delete a Locked File Picture 33How to Delete a Locked File Picture 33
    Click Find Handle or DLL…. You'll find this option in the Find drop-down menu. A search box will pop up.
  15. How to Delete a Locked File Picture 34How to Delete a Locked File Picture 34
    Enter the locked file's name. Type the name of the locked file into the text box, then click Search to the right of the text box.
  16. How to Delete a Locked File Picture 35How to Delete a Locked File Picture 35
    Select the locked file. Click the name of the locked file in the search window.
  17. How to Delete a Locked File Picture 36How to Delete a Locked File Picture 36
    Find the highlighted file name in Process Explorer. In the Process Explorer window (not the search window), you should see the file's name highlighted near the bottom of the window.
  18. How to Delete a Locked File Picture 37How to Delete a Locked File Picture 37
    Right-click the file name. A pop-up menu will appear.
    1. If your mouse doesn't have a right-click button, click the right side of the mouse, or use two fingers to click the mouse.
    2. If your computer uses a trackpad instead of a mouse, use two fingers to tap the trackpad or press the right side of the trackpad's mouse.
  19. How to Delete a Locked File Picture 38How to Delete a Locked File Picture 38
    Click Close Handle. It's in the right-click pop-up menu. Doing so unlocks the file, making it possible to delete the file.
  20. How to Delete a Locked File Picture 39How to Delete a Locked File Picture 39
    Find your file. Open Start
    How to Delete a Locked File Picture 40How to Delete a Locked File Picture 40
    , open File Explorer
    How to Delete a Locked File Picture 41How to Delete a Locked File Picture 41
    , and locate the previously locked file.
  21. How to Delete a Locked File Picture 42How to Delete a Locked File Picture 42
    Delete the file. Click the previously locked file, click the Home tab, and click Delete in the toolbar that appears.
    1. Alternatively, you can click the file to select it and then press the Delete key.
  22. How to Delete a Locked File Picture 43How to Delete a Locked File Picture 43
    Empty the Recycle Bin. Double-click the Recycle Bin icon on your desktop, then click the Manage tab and click Empty Recycle Bin in the toolbar. Your file should be deleted.
Method 3 of 4:

Using the Info Menu on Mac

  1. How to Delete a Locked File Picture 44How to Delete a Locked File Picture 44
    Open Finder. It's the blue, face-like app icon in your Mac's Dock.
  2. How to Delete a Locked File Picture 45How to Delete a Locked File Picture 45
    Find the file that you want to delete. On the left side of the Finder window, click the folder in which your locked file is stored.
  3. How to Delete a Locked File Picture 46How to Delete a Locked File Picture 46
    Select the file. Click the file that you want to delete.
  4. How to Delete a Locked File Picture 47How to Delete a Locked File Picture 47
    Click File. It's a menu item in the upper-left side of the screen. A drop-down menu will appear.
  5. How to Delete a Locked File Picture 48How to Delete a Locked File Picture 48
    Click Get Info. This option is in the File drop-down menu. Doing so opens a window with the locked file's information.
  6. How to Delete a Locked File Picture 49How to Delete a Locked File Picture 49
    Unlock the Get Info menu. If the lock icon in the bottom-right corner of the window is closed, click it, then enter your administrator password.
  7. How to Delete a Locked File Picture 50How to Delete a Locked File Picture 50
    Uncheck the "Locked" box. In the middle of the "Get Info" window, there will be a checkbox with the word "Locked" next to it; uncheck this box to unlock the file.
  8. How to Delete a Locked File Picture 51How to Delete a Locked File Picture 51
    Close the "Get Info" window. Click the red circle in the upper-left corner of the window.
  9. How to Delete a Locked File Picture 52How to Delete a Locked File Picture 52
    Move the file to the Trash. Select the file, click the Edit menu item at the top of the screen, and click Move to Trash. The locked file will be sent to the Trash.
  10. How to Delete a Locked File Picture 53How to Delete a Locked File Picture 53
    Empty the Trash. Click and hold the Trash icon in your Mac's Dock, then click Empty Trash when prompted. Doing so will delete anything in the Trash, including your locked file.
Method 4 of 4:

Using Terminal on Mac

  1. How to Delete a Locked File Picture 54How to Delete a Locked File Picture 54
    Move the locked file to the Trash. Click the locked file to select it, then click the Edit menu item at the top of the screen and click Move to Trash in the resulting drop-down menu.
  2. How to Delete a Locked File Picture 55How to Delete a Locked File Picture 55
    Open Spotlight
    How to Delete a Locked File Picture 56How to Delete a Locked File Picture 56
    . Click the magnifying glass icon in the top-right corner of the screen. A text box will appear.
  3. How to Delete a Locked File Picture 57How to Delete a Locked File Picture 57
    Type in terminal. This will search your computer for the Terminal app.
  4. How to Delete a Locked File Picture 58How to Delete a Locked File Picture 58
    Click
    How to Delete a Locked File Picture 59How to Delete a Locked File Picture 59
    Terminal. It's a black box with a white ">_" icon on it. The Terminal app will open.
  5. How to Delete a Locked File Picture 60How to Delete a Locked File Picture 60
    Type in the force-empty command. Type sudo rm -R into Terminal, making sure to place a space after "R". Don't hit Return just yet.[2]
  6. How to Delete a Locked File Picture 61How to Delete a Locked File Picture 61
    Open the Trash. Hold down Ctrl while clicking the Trash icon to do so.
  7. How to Delete a Locked File Picture 62How to Delete a Locked File Picture 62
    Find the locked file. If there are multiple files in the Trash, find the locked one that you just deleted.
    1. In instances where your Trash won't empty even though you've unlocked the files, select all files in the Trash by clicking one file and then pressing Command+A instead.
  8. How to Delete a Locked File Picture 63How to Delete a Locked File Picture 63
    Copy the file into the Terminal window. Click and drag the locked file onto the Terminal window, then release the mouse.
    1. If you selected all of the files in the Trash, clicking and dragging one file into Terminal will prompt all of the files to copy into Terminal.
  9. How to Delete a Locked File Picture 64How to Delete a Locked File Picture 64
    Press Return. Once the files have copied into Terminal, pressing Return will request permission to run your force-delete command.
  10. How to Delete a Locked File Picture 65How to Delete a Locked File Picture 65
    Type in your Administrator password. This is the password that you use to log into your Mac.
    1. You won't see letters or characters appear as you type your password in Terminal.
  11. How to Delete a Locked File Picture 66How to Delete a Locked File Picture 66
    Press Return again. Doing so runs the force-delete command and empties the Trash. You should no longer have any locked or persistent files in the Trash.
5 ★ | 2 Vote