Also exclude deactivated repositories from uninstallation.
Merge in fix from next-stable.