7 Ways to Delete Files That Cannot Be Deleted - wikiHow (2024)

Download Article

Delete files on Windows, macOS, Linux, and Android

Explore this Article

methods

1Deleting Files in Safe Mode on Windows

2Using the Command Prompt on Windows

3Repairing Disk Errors on Windows

4Deleting Files in Safe Mode on Mac

5Using The Terminal on Mac and Linux

6Repairing Disk Errors on Mac

7Using SD Maid on Android

+Show 4 more...

-Show less...

Other Sections

Tips and Warnings

Related Articles

References

Article Summary

Written byTravis Boylls

Last Updated: February 21, 2024Fact Checked

Download Article

This wikiHow teaches you how to delete regular files that you can't seem to delete on your computer. Most of the time, files you can't delete are being used by a program or a service; you can start your computer in Safe Mode to prevent the largest possible number of programs and services from running to address this issue. If the file is corrupted or your computer reports that it can't find the file, repairing your hard drive's disk errors may fix the problem. On Android phones and tablets, you can use third-party apps to delete files on your phone or tablet. Keep in mind that this article does not address deleting system-level files, as doing so will prevent your computer from running properly (if at all).

Method 1

Method 1 of 7:

Deleting Files in Safe Mode on Windows

Download Article

  1. 1

    Click the Start button

    . It's the button with the Windows logo in the bottom-left corner of the screen. The Start menu will pop up.

  2. 2

    Click Power

    . It's in the bottom-left corner of the Start menu. A pop-up menu will appear.

    Advertisem*nt

  3. 3

    Hold down Shift while clicking Restart. Your computer will begin to restart like usual, but don't release the Shift key until the next step.

  4. 4

    Release Shift when the blue screen appears. Once the blue screen appears, you can release the Shift key and proceed.

  5. 5

    Click Troubleshoot. It's in the middle of the screen next to an icon that resembles tools.

  6. 6

    Click Advanced options. You'll find this in the middle of the screen next to an icon with three lines next to checkmarks.

  7. 7

    Click Startup Settings. This option is on the right side of the page next to an icon that resembles a gear.[1]

  8. 8

    Click Restart. It's the button in the lower-right corner of the screen.

  9. 9

    Press the "Safe Mode" key. This key is usually 4. Check which number "Enable Safe Mode" is listed next to in the "Startup Settings" menu.[2]

    • If 4 doesn't work, try pressing F4 (you may need to hold down Fn while pressing F4).[3]
  10. 10

    Press Win+E to open File Explorer

    . Once Windows boots up in Safe Mode, open File Explorer.

  11. 11

    Find the file you want to delete. Use File Explorer to navigate to the folder that contains the file that you want to delete. Double-click a folder to open it.

  12. 12

    Select the file. Click once the file to select it. This will highlight it in blue.

    • If there are multiple files hold "Ctrl" and click them to select multiple files.
  13. 13

    Press the Del key. Doing so will move the file into the Recycle Bin.

    • If you're still unable to delete the selected files, you may need to repair your PC's hard drive before attempting to delete the files again.
  14. 14

    Empty the Recycle Bin. Once you've moved the correct files into the Recycle Bin, you can proceed with removing them from your PC for good:

    • Right-click the Recycle Bin icon.
    • Click Empty Recycle Bin in the resulting drop-down menu.
    • Click Yes when prompted.
  15. 15

    Restart your computer. Do the following to exit Safe Mode:

    • Click Start.
    • Click Power.
    • Click Restart.
  16. Advertisem*nt

Method 2

Method 2 of 7:

Using the Command Prompt on Windows

Download Article

  1. 1

    Click the Windows Start menu

    . It's the icon with the windows logo. By default, it's in the lower-left corner.[4]

  2. 2

    Type cmd. This displays the Command Prompt in the Windows Start menu. |

  3. 3

    Right-click the Command Prompt

    and click Run as administrator. This opens the Command Prompt with administrative privileges.[5]

    • You must be signed in to an Administrative account on Windows to run the Command Prompt as an administrator.
  4. 4

    Type cd/ and press Enter. This command returns you to your root directory in the Command Prompt.[6]

    • If you to need to change drives in the command prompt, simply type the drive letter followed by a colon (i.e. "D:")
  5. 5

    Type cd followed by the file location and press Enter. This navigates to the folder the file is located in. Separate each folder with a "\". For example "cd users\username\documents\".[7]

    • To see a list of files and folders in a directory, type "dir" and press Enter.
  6. 6

    Type del followed by the file name and press Enter. For example, "del testfile.txt". This deletes the file.[8]

    • If the file name has spaces in it (i.e. File Name.txt") place the file name in quotations (i.e. del "File Name.txt")
  7. Advertisem*nt

Method 3

Method 3 of 7:

Repairing Disk Errors on Windows

Download Article

  1. 1

    Close any open files. When repairing disk errors on Windows, it's wise (though not strictly necessary) to close any open files to prevent further issues. Be sure to save any work you have and close a program by click the "X" icon in the upper-right corner, or use the following steps to close programs in the Task Manager:

    • Press "Ctrl + Shift + Esc" to open the Task Manager.
    • Click an app that is open.
    • Click "End Task' in the lower-right corner.
  2. 2

    Press Win+E to open File Explorer

    . File Explorer has an icon that resembles a folder with a blue clip.

  3. 3

    Click This PC. It's in the sidebar menu to the left in File Explorer. It has an icon that resembles a computer monitor.

  4. 4

    Right-clck your computer's hard drive. It's usually the one marked (C:), below the "Devices and drives" heading. It may be named "OS (C:)" or have your computer name or drive name. Right-clicking it will display a drop-down menu below it.[9]

    • You can double-click the "Devices and drives" heading to expand it if you don't see any hard drives listed there.
    • If your computer has more than one hard drive, click the hard drive on which the file you want to delete is stored.
  5. 5

    Click Properties. It's in the drop-down menu. A pop-up window will open.

  6. 6

    Click the Tools tab. This is at the top of the pop-up window.

  7. 7

    Click Check. It's near the top of the window in the box labeled "Error Checking".[10]

  8. 8

    Click Scan drive when prompted. Doing so allows Windows to begin scanning your hard drive for errors.[11]

    • If Windows finds any errors, they will be repaired automatically if possible.
  9. 9

    Allow the scan to run. This can take several minutes to several hours depending on your selected hard drive's size and number of errors.

  10. 10

    Try deleting your file again. Now that you've repaired any issues with your hard drive, you should be able to delete any files which were locked due to hard drive issues. Use File Explorer to navigate to the file and click it to select it. Press the "Del" key to delete it.

    • You may still have to use Safe Mode to delete your file if the file is being used by a program or service.
    • If you still can't delete the file in question, the file is most likely either locked by another user or reserved as a system file. Either way, you won't be able to delete the file.
  11. Advertisem*nt

Method 4

Method 4 of 7:

Deleting Files in Safe Mode on Mac

Download Article

  1. 1

    Open the Apple menu

    . It's the icon with the Apple logo in the top-left corner of the screen in the menu bar. A drop-down menu will appear.

  2. 2

    Click Restart…. It's in the drop-down menu below the Apple icon.

  3. 3

    Click Restart when prompted. Doing so causes your Mac to begin restarting.

  4. 4

    Hold down the Shift key. Make sure you do this immediately after clicking Restart, and don't stop until the next step.

  5. 5

    Release the Shift key at the login window. This ensures that your Mac starts in Safe Mode rather than using regular boot settings.[12]

  6. 6

    Open the Finder

    . It's the icon that has a blue and white smiley face. You can find it in the Dock at the bottom of your screen.

  7. 7

    Navigate to the file you want to delete. Use the Finder to navigate to the folder containing the file you want to delete. Double-click the folder to open it.

  8. 8

    Select the file. Click once the file you want to delete. This highlights the file in blue

    • If there are multiple files you want to delete from one location, you can hold down "Command" while clicking each file you want to delete.
  9. 9

    Click File. It's at the top of the screen. A drop-down menu will appear.

  10. 10

    Click Move to Trash. This is in the drop-down menu. Doing so should move the files to the Trash.[13]

    • If you're still unable to delete the selected files, you may need to repair your Mac's hard drive before attempting to delete the files again.
  11. 11

    Empty the Trash. Once you've moved the correct files into the Trash, you can proceed with removing them from your Mac for good:[14]

    • Click and hold the Trash app icon.
    • Click Empty Trash in the resulting menu.
    • Click Empty when prompted.
  12. 12

    Restart your Mac. Do the following to exit Safe Mode:

    • Click the Apple menu.
    • Click Restart....
    • Click Restart when prompted.
  13. Advertisem*nt

Method 5

Method 5 of 7:

Using The Terminal on Mac and Linux

Download Article

  1. 1

    Open the Terminal. The Terminal has an icon that resembles a black screen with a text cursor. Use the following steps to open the Terminal on Mac:[15]

    • Click the Magnifying Glass icon in the upper-right corner.
    • Type Terminal in the search bar.
    • Click the Terminal icon.
  2. 2

    Type cd and press Enter. This navigates to the root directory on your computer.

  3. 3

    Type cd ~/ followed by the file location and press Enter. This navigates to the folder(s) the file is located in. Be sure to separate each folder with a "/". Make sure you use the correct capitalization. For example, "cd ~/documents".[16]

    • You can also type "ls" and press Enter to see a list of folders and files in the current directory.
  4. 4

    Type rm followed by a space and the file name and press Enter. For example, "rm textfile.txt". This deletes the file.[17]

    • If the file name has spaces in it, place the file name in quotations (i.e rm "text file.txt")
  5. 5

    Type y and press Enter. If the file is write-protected, you will need to confirm that you want to delete the file. To confirm, type "y" and press Enter.

    • Alternatively, you can type "rm -f" followed by the file name to force delete the file name.
  6. Advertisem*nt

Method 6

Method 6 of 7:

Repairing Disk Errors on Mac

Download Article

  1. 1

    Open the Apple menu

    . Click the Apple logo in the top-left corner of the screen. A drop-down menu will appear.

  2. 2

    Click Restart…. It's in the drop-down menu.

  3. 3

    Click Restart when prompted. Doing so causes your Mac to begin restarting.

  4. 4

    Hold down the Command+R keys. Do this immediately after hearing the Startup chime.

  5. 5

    Release the keys when the Apple logo appears. This loads the Recovery menu.

    • The Recovery menu may take a few minutes to appear.
  6. 6

    Click Disk Utility. It's next to an icon that resembles a hard disk drive with a stethoscope.[18]

  7. 7

    Click Continue. This is in the lower-right corner of the screen. The Disk Utility window will open.

  8. 8

    Click View. It's a menu item at the top of the screen. A drop-down menu will appear.

  9. 9

    Click Show All Devices. This is in the drop-down menu. You should see a list of your Mac's available storage locations appear on the left side of the screen.

  10. 10

    Select your Mac's hard drive. It's in the sidebar menu to the left.

    • If your Mac has more than one hard drive, make sure you click the one on which the file you want to delete is stored.
  11. 11

    Click the First Aid icon. It's a tab which resembles a stethoscope at the top of the window.[19]

  12. 12

    Click Run when prompted. Doing so allows Disk Utility to begin scanning and repairing your Mac's hard drive.[20]

  13. 13

    Delete files if asked. If Disk Utility reports an "overlapped extent allocation" error, you will be asked to take action; in this case, you can delete any damaged or corrupted files in a related list. If you see the file you want to delete in this list, do so before proceeding.

  14. 14

    Restart your Mac. Once Disk Utility finishes running, you can use the following steps to restart your Mac:[21]

    • Click the Apple Icon.
    • Click Restart...
    • Click Restart when prompted.
  15. 15

    Try deleting the file again. Now that you've repaired any issues with your hard drive, you should be able to delete any files which were locked due to hard drive issues. Open the Finder and navigate to the file and click it. Then drag it to the Trash to delete it.

    • You may still need to use Safe Mode to delete the file if it's used frequently by a default program.
    • If you still can't delete the file in question, the file is most likely either locked by another user or reserved as a system file. Either way, you won't be able to delete the file.
  16. Advertisem*nt

Method 7

Method 7 of 7:

Using SD Maid on Android

Download Article

  1. 1

    Download and install SD Maid. SD Maid is a system cleaning app for Android. It can help you delete some files that you cannot delete in the My Files app. Be aware that some files on Android can't and shouldn't be deleted because they are part of the root system or a specific app. Use the following steps to download SD Maid:

    • Open the Google Play Store.
    • Type "SD Maid" in the search bar at the top.
    • Tap Install below SD Maid.
  2. 2

    Open SD Maid. SD Maid has an icon that resembles the Android robot wearing a maid's uniform. Tap the icon on your home screen or apps menu or tap Open in the Google Play Store to open SD Maid.

  3. 3

    Tap to open the menu. The icon with the three horizontal lines is in the upper-left corner. This opens the menu.

  4. 4

    Tap Storage analyzer. It's near the bottom of the list of options below "Tools" in the menu.

  5. 5

    Tap the

    icon. It's the green button with a circular arrow in the lower-right corner. This searches your file system on your Android device.

    • The first time you use this feature, you may be asked to grant SD Maid permissions to access your internal storage and SD card. If you receive a prompt asking if you would like to allow SD Maid to access your system, tap Allow to continue.
  6. 6

    Tap the storage drive with the file you want to delete. The public storage drive labeled "Primary" is the internal storage for your phone or tablet. The public storage labeled "Secondary" is the SD card. Tap the storage that contains the file you want to delete.

  7. 7

    Navigate to the file you want to delete. Tap the folders on the screen to open the folder. Files associated with a specific app are usually in a folder with the app's name. Pictures can be found in a folder called "DCIM" or "Pictures". Files downloaded from the internet can be found in "Download" and random files can be found in the "Documents" folder.

  8. 8

    Tap and hold the file or folder you want to delete. This selects the item. A bar will appear at the top of the screen.

  9. 9

    Tap the trashcan item. It's in the upper-right corner of the app. This deletes the file.

    • After deleting the file in SD Maid, you may want to check to make sure it is deleted in the My Files or Files app. If it hasn't been deleted, try deleting it in the SD Maid app. You may be able to delete it after removing it using SD Maid.
  10. 10

    Back up and reset your Android phone or tablet. Unfortunately, no solution is going to work in every instance on Android. If you cannot delete a file, you can try to back up your Android phone or tablet, and then reset it. You can restore your Android phone from the backup during the initial setup process.[22] This should only be done as a last resort, and only if you really need to get rid of the file.

  11. Advertisem*nt

Community Q&A

Search

Add New Question

  • Question

    How do I delete files from my Android?

    7 Ways to Delete Files That Cannot Be Deleted - wikiHow (93)

    Community Answer

    Shut your phone down and connect it to your computer. Be wary, though, as the files they don't want you to delete are there for a reason.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 7Helpful 10

  • Question

    I can't delete my file because it says that the file couldn't be found, I have followed all the steps but still can't delete it. Anyone one know how to delete it?

    7 Ways to Delete Files That Cannot Be Deleted - wikiHow (94)

    Petermay

    Community Answer

    Using the "Long Path Tool" any file can be deleted even the long file name. Try that and see if it works for you.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 9Helpful 8

  • Question

    How do I delete a desktop folder when it says the file name is too long?

    7 Ways to Delete Files That Cannot Be Deleted - wikiHow (95)

    Community Answer

    Highlight the folder, left click and press "rename." Make the name shorter, then press enter. You should be able to delete the folder then.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 13Helpful 8

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

      Advertisem*nt

      Tips

      • Safe Mode disables most of the programs and services on your computer to ensure that processes such as deleting stubborn files won't be impacted.

        Thanks

        Helpful0Not Helpful0

      • System-level files, such as DLL files on Windows computers, are responsible for your computer's basic functions and appearances.

        Thanks

        Helpful0Not Helpful0

      Submit a Tip

      All tip submissions are carefully reviewed before being published

      Name

      Please provide your name and last initial

      Submit

      Thanks for submitting a tip for review!

      7 Ways to Delete Files That Cannot Be Deleted - wikiHow (96)

      Advertisem*nt

      Warnings

      • Deleting system files will ruin your computer, at which point you'll either need to reinstall your computer's operating system or buy a new computer.

        Thanks

        Helpful0Not Helpful0

      Advertisem*nt

      References

      1. https://support.microsoft.com/en-us/windows/start-your-pc-in-safe-mode-in-windows-92c27cff-db89-8644-1ce4-b3e5e56fe234
      2. https://support.microsoft.com/en-us/windows/start-your-pc-in-safe-mode-in-windows-92c27cff-db89-8644-1ce4-b3e5e56fe234
      3. https://support.microsoft.com/en-us/help/12376/windows-10-start-your-pc-in-safe-mode
      4. https://grok.lsu.edu/article.aspx?articleid=18026&printable=y
      5. https://grok.lsu.edu/article.aspx?articleid=18026&printable=y
      6. https://www.freecodecamp.org/news/cmd-delete-folder-how-to-remove-files-and-folders-in-windows/
      7. https://www.freecodecamp.org/news/cmd-delete-folder-how-to-remove-files-and-folders-in-windows/
      8. https://www.freecodecamp.org/news/cmd-delete-folder-how-to-remove-files-and-folders-in-windows/
      9. https://support.microsoft.com/en-gb/topic/check-your-hard-disk-for-errors-in-windows-7-ddeb9e4b-6777-b2bd-4507-9259dba1a495

      More References (13)

      1. https://support.microsoft.com/en-gb/topic/check-your-hard-disk-for-errors-in-windows-7-ddeb9e4b-6777-b2bd-4507-9259dba1a495
      2. https://support.microsoft.com/en-gb/topic/check-your-hard-disk-for-errors-in-windows-7-ddeb9e4b-6777-b2bd-4507-9259dba1a495
      3. https://support.apple.com/en-us/116946
      4. https://support.apple.com/guide/mac-help/delete-files-and-folders-on-mac-mchlp1093/mac
      5. https://support.apple.com/guide/mac-help/delete-files-and-folders-on-mac-mchlp1093/mac
      6. https://support.apple.com/guide/terminal/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125/mac
      7. https://www.macworld.com/article/222596/command-line-deleting-files-folders-mac-terminal.html
      8. https://www.macworld.com/article/222596/command-line-deleting-files-folders-mac-terminal.html
      9. https://support.apple.com/en-us/102611
      10. https://support.apple.com/guide/disk-utility/repair-a-disk-dskutl1040/mac
      11. https://support.apple.com/en-us/102611
      12. https://support.apple.com/en-us/102611
      13. https://support.google.com/android/answer/2819582?hl=en

      About This Article

      7 Ways to Delete Files That Cannot Be Deleted - wikiHow (111)

      Written by:

      wikiHow Technology Writer

      This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 1,027,229 times.

      How helpful is this?

      Co-authors: 22

      Updated: February 21, 2024

      Views:1,027,229

      Categories: Windows Files

      Article SummaryX

      1, Reboot your computer in Safe Mode.
      2. Open File Explorer on PC or the Finder on Mac.
      3. Navigate to the folder containing the file.
      4. Click the file and press the Delete key.
      5. Empty the Trash bin.
      6. Right-click the hard drive in File Explorer (open the Disk Utility app on Mac).
      7. Click Properties followed by the Tools tab (on Mac, click First Aid followed by Run)).
      8. Try deleting the file again.
      For more advice, like how to resolve disc errors on your Windows computer or Mac, keep reading!

      Did this summary help you?

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 1,027,229 times.

      Is this article up to date?

      7 Ways to Delete Files That Cannot Be Deleted - wikiHow (112)

      Advertisem*nt

      7 Ways to Delete Files That Cannot Be Deleted - wikiHow (2024)
      Top Articles
      Advantages of Living Close to the Work Location - Auro Realty
      How to Destroy a Metal Credit Card
      Overton Funeral Home Waterloo Iowa
      Tmf Saul's Investing Discussions
      Directions To Franklin Mills Mall
      12 Rue Gotlib 21St Arrondissem*nt
      Summit County Juvenile Court
      Konkurrenz für Kioske: 7-Eleven will Minisupermärkte in Deutschland etablieren
      Directions To 401 East Chestnut Street Louisville Kentucky
      Big Y Digital Coupon App
      Cinepacks.store
      My.doculivery.com/Crowncork
      Culver's Flavor Of The Day Monroe
      Wunderground Huntington Beach
      Byte Delta Dental
      Katherine Croan Ewald
      Skyward Login Jennings County
      Imagetrend Inc, 20855 Kensington Blvd, Lakeville, MN 55044, US - MapQuest
      Shasta County Most Wanted 2022
      Missed Connections Inland Empire
      Gopher Hockey Forum
      What Is Vioc On Credit Card Statement
      Walgreens Alma School And Dynamite
      Gina Wilson All Things Algebra Unit 2 Homework 8
      The EyeDoctors Optometrists, 1835 NW Topeka Blvd, Topeka, KS 66608, US - MapQuest
      8005607994
      Kohls Lufkin Tx
      Beaufort 72 Hour
      Pain Out Maxx Kratom
      Catchvideo Chrome Extension
      Netspend Ssi Deposit Dates For 2022 November
      Nottingham Forest News Now
      Truck from Finland, used truck for sale from Finland
      Warren County Skyward
      Khatrimmaza
      Verizon TV and Internet Packages
      RUB MASSAGE AUSTIN
      Ny Post Front Page Cover Today
      Keeper Of The Lost Cities Series - Shannon Messenger
      B.C. lightkeepers' jobs in jeopardy as coast guard plans to automate 2 stations
      A Comprehensive 360 Training Review (2021) — How Good Is It?
      Home Auctions - Real Estate Auctions
      Fool's Paradise Showtimes Near Roxy Stadium 14
      Mybiglots Net Associates
      The Blackening Showtimes Near Ncg Cinema - Grand Blanc Trillium
      Waco.craigslist
      Theatervoorstellingen in Nieuwegein, het complete aanbod.
      Model Center Jasmin
      Sams La Habra Gas Price
      Ingersoll Greenwood Funeral Home Obituaries
      How to Choose Where to Study Abroad
      Latest Posts
      Article information

      Author: Twana Towne Ret

      Last Updated:

      Views: 5838

      Rating: 4.3 / 5 (44 voted)

      Reviews: 91% of readers found this page helpful

      Author information

      Name: Twana Towne Ret

      Birthday: 1994-03-19

      Address: Apt. 990 97439 Corwin Motorway, Port Eliseoburgh, NM 99144-2618

      Phone: +5958753152963

      Job: National Specialist

      Hobby: Kayaking, Photography, Skydiving, Embroidery, Leather crafting, Orienteering, Cooking

      Introduction: My name is Twana Towne Ret, I am a famous, talented, joyous, perfect, powerful, inquisitive, lovely person who loves writing and wants to share my knowledge and understanding with you.