foreman-rake console
expected_pulp_ids = Katello::Repository.pluck(:pulp_id) + Katello::ContentViewPuppetEnvironment.pluck(:pulp_id)
actual_pulp_ids = Katello.pulp_server.resources.repository.retrieve_all.map{|r| r['id']}
puts actual_pulp_ids - expected_pulp_ids