Could this logic go into `remove_irrelevant_packages`, please?