I'm trying to delete a file geodatabase through Windows Explorer but I get the error message:

The action can't be completed because the folder or file in it is open in another program. Close the folder and try again.

I have no success deleting it through right-click in ArcCatalog, or using Delete_management in a Python script. I've deleted all map services that could be using this geodatabase. I've covered issues like making sure no one else has this geodatabase open. Does anyone know how I can delete this geodatabase? Or does anyone know how I can determine what might be locking it? Quick and dirty methods are welcome.


3 Answers 3


Just reset the computer and you will clear all locks, open ArcCatalog and delete the Filegeodatabase

  • 4
    this only works if the geodatabase is on the local computer, network drives can have active connections from other users.
    – Mapperz
    Apr 19, 2013 at 16:23
  • Hey, thanks all for the feedback. My network people restarted the server (yep, it was a server) and I was able to delete the file geodatabase. My Friday is saved!
    – Patty Jula
    Apr 19, 2013 at 17:12

If you cannot reset your computer (such as a server that is running a critical process) you can actually use Windows Explorer and delete the .LOCK file directly from the .gdb folder. You will also see, while doing this, who the culprit is (what computer), in order to track down the process that is (probably) crashing and causing the lock to remain.

If you compact a GDB through Toolbox, that will also remove all the lock files.


Sometimes I will be unable to delete a geodatabase even when Arcmap is closed (verified by using Windows Task Manager). What worked for me is in Windows Task Manager, go to Processes tab, and close all the Arcmap processes that continue running even after the application has been closed. This allows me to then delete what I need to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.