Move filter into remove_irrelevant_packages