Added recursive database purge