added method, which searchs for obsolete packages and deletes them (set the state to deleted).