Added purge flag to wipe database tables and old img downloads.