1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env python # # a example that prints the URIs of all upgradable packages # import apt for pkg in apt.Cache(): if pkg.is_upgradable: print pkg.candidate.uri