Refactor _list_packages to allow for unofficial package strings