Use python-apt instead of parse apt-cache output