stefan.haglundesri-se-esridist

Best/fastest way to delete all FC's in a geodatabase?

Discussion created by stefan.haglundesri-se-esridist Employee on Oct 10, 2012
Latest reply on Oct 11, 2012 by dhoneycutt-esristaff
Hi All,

This is a problem I run into from time to time and have never found a good solution for.

Right now I am using Modelbuilder to create a workflow that creates a lot of intermediate data. Likely because I have an iterator in the model, only the last FC (marked as intermediate) that the iterator comes across is deleted from my scratch.gdb. I would like to clean out my scratch.gdb, but not remove the geodatabase itself, after my model is run. There are a couple of ways to do this but all that I'm aware of are time-consuming. I'ver tried Iterate Feature Classes and Delete_management, but both just takes too long time.

In other workflows, I've come across the same problem of cleaning out a gdb without removing it where I've had several thounds of FC's and it simply takes too much time.

Any ideas...?

Thanks!

Outcomes