Re: list installed packages present only in stable
On Wed, 26 Oct 2016 08:16:56 -0400
kamaraju kusumanchi <raju.mailinglists@gmail.com> wrote:
> But now I find that my system has lots of packages from Jessie which
> are no longer present in either Stretch or Sid. I would like get a
> list of all such packages and decide if I want to remove them.
A small change to my first script should list all packages that are
neither in stretch nor sid, not 100% exactly what you are looking for,
but maybe good enough (?):
#!/usr/bin/python
from commands import getoutput
allpkgs = getoutput('apt-show-versions -b').splitlines()
stretch = [p for p in allpkgs if 'stretch' in p]
sid = [p for p in allpkgs if 'sid' in p]
notsidorstretch = [p for p in allpkgs if not p in (stretch+sid)]
for p in notsidorstretch:
print(p.split(':')[0])
Regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
Phasers locked on target, Captain.
Reply to: