generalized resetdb for os