Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
if on a network or shared drive other users might be connected to it. Removing lock files use… – Mapperz Apr 19 '13 at 15:29
I have same problem.i stop arcgis services then restart my computer. also check your permisions ,read only . – wetland Apr 19 '13 at 15:33
up vote 4 down vote accepted

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

share|improve this answer
this only works if the geodatabase is on the local computer, network drives can have active connections from other users. – Mapperz Apr 19 '13 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 '13 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.

share|improve this answer
Thank you, Tom. This is good to know. – Patty Jula Apr 22 '13 at 14:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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