A recent upgrade from Ubuntu Gutsy to Ubuntu Hardy started causing apt to fail due to an internal failure in lsb_release : # lsb_release Traceback (most recent call last): File "/usr/bin/lsb_release", line 327, in main() File "/usr/bin/lsb_release", line 291, in main distinfo = get_distro_information() File "/usr/bin/lsb_release", line 254, in get_distro_information distinfo = guess_debian_release() File "/usr/bin/lsb_release", line 213, in guess_debian_release rinfo = guess_release_from_apt() File "/usr/bin/lsb_release", line 169, in guess_release_from_aptv version = RELEASE_CODENAME_LOOKUP.get(unknown, rinfo.get('suite','')) NameError: global name 'unknown' is not defined The problem turned out to be due to these two entries in /etc/apt/sources.list which were being used to get Polarion : deb http://debian.sh.cvut.cz/debian/ etch main non-free deb http://security