As I was freeing up some space for my computer and I saw that my file geodatabase has about 150 GB inside the .gdb folder, I decided to delete some old files. So that is when my problem started. I accidentally deleted (shift+delete) some of the essential files and now ArcMap does not read Default.gdb as a database but rather as a folder

Is there a way to fix this?

If not, is there a way to recover the remaining feature classes in that folder so that I can use them again?

  • 1
    The oldest files in the .gdb folder are the data dictionary tables which describe the locations of the user-generated tables, and which are the hardest to recreate by any recovery tool (the format is known, but the contents are infinitely complex).
    – Vince
    Commented Sep 4, 2019 at 2:59
  • Always make a backup before what you do.
    Commented Sep 4, 2019 at 4:01
  • if you are on window and depending on how your computer is set you may try to right click on the .gdb in the explorator, open the properties and go to previous version to see if you can to restore the data at an earlier date....
    – J.R
    Commented Sep 4, 2019 at 8:38
  • Also for reducing the size of a .gdb you should first try to compact it (right click on arccatalog then administration>compact), or open it in arccatalog to delete the old layer you no longer need.
    – J.R
    Commented Sep 4, 2019 at 8:41
  • If the area on the hard disk hasn't been overwritten yet, there are some tools that will let you recover deleted files (as usually the content itself is left intact, only the the pointer to the disk area is deleted). google it.
    – JGH
    Commented Sep 4, 2019 at 12:12

1 Answer 1


If you have permanently deleted files from a database, then the entire database is essentially corrupted and unusable.

Many databases (including file geodatabases) use a set of files which must remain internally consistent between them. Any changes to those files outside of the application(s) that understand how the database architecture works will corrupt the database. Deleting any of the files will corrupt the database.

You could try to recover some of the remaining data using the Recover File Geodatabase tool in ArcMap. See: http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/recover-file-geodatabase.htm

If this doesn't work, you may be out of luck.

It may be possible to undo the damage by replacing the files exactly as they were before being deleted, but if they are permanently deleted (and not in the trash/bin), then that is not possible.

Do you have backups? You need to recover these fGDBs from backups if you do.

If you do not have backups, then the data is most likely permanently destroyed.

For future reference, you should never even open a .gdb folder in Windows explorer (or any other application that is not designed to work with fGDBs.

fGDBs are an inferior format to some other formats which manage the entire database in a single file (eg, geopackage, and other SQLitebased formats).

  • Hello I tried the code and replace the file locations etc. and I get this error >>> arcpy.RecoverFileGDB_management('C:\Users\GIS User\Documents\ArcGIS\Default.gdb', 'C:\Users\GIS User\Documents\recover', 'recoveredWhistler.gdb') Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 3865, in RecoverFileGDB raise e ExecuteError:
    – Cissnei
    Commented Sep 4, 2019 at 3:21
  • Failed to execute. Parameters are not valid. ERROR 000732: Output Location: Dataset C:\Users\GIS User\Documents ecover does not exist or is not supported Failed to execute (RecoverFileGDB).
    – Cissnei
    Commented Sep 4, 2019 at 3:21
  • You didn't escape the backslashes or use raw formatting on the parameter string.
    – Vince
    Commented Sep 4, 2019 at 3:46
  • ...or use normal ('foward') slashes (/) instead of backslashes (\). In particular, the "\r" in your text string is interpretted by Python as a carriage return character. Commented Sep 4, 2019 at 4:07

Your Answer

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

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