'Remove a provider from the ProviderIndex.'

def remove_provider(self, pkg_name):

    empty_pkg_dict = []
    for (pkg, pkg_dict) in self.providers.items():
        empty_pset = []
        for (provided, pset) in pkg_dict.items():
            same_name = set((p for p in pset if (p.fullname == pkg_name)))
            pset.difference_update(same_name)
            if (not pset):
                empty_pset.append(provided)
        for provided in empty_pset:
            del pkg_dict[provided]
        if (not pkg_dict):
            empty_pkg_dict.append(pkg)
    for pkg in empty_pkg_dict:
        del self.providers[pkg]
