Change db purge to work on output DB