On Wed, Nov 2, 2016 at 6:16 AM, Jonathan Dowland <j...@debian.org> wrote: > On Sun, Oct 23, 2016 at 08:48:46PM -0400, kamaraju kusumanchi wrote: >> How can I list all the packages installed on my system that are >> currently part of the stable distribution but not present in either >> testing or sid? > > This is a good question (sorry I don't have the answer here). I recently > hit a similar situation with mediawiki, which exists in everything except > stable. I realised that if you have upgraded between Debian versions at > some point, you might have some packages installed from the former release > (now oldstable) that are not in current release, and so you might not get > security updates for those packages (once security updates cease for > oldstable). > > In the case of mediawiki there is a version in jessie-backports, but default > pining rules / apt preferences would not upgrade the package automatically in > this situation.
Hi Jonathan, Not sure if you read the entire thread, I ended up writing a script to do this now. So, if you want to see packages that are currently installed on your system but not part of jessie, you can do the following. Step 1: Update the cache % grep_installed.py --exclude-dists 'jessie' --update-cache Processed: http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages.gz Processed: http://httpredir.debian.org/debian/dists/jessie/contrib/binary-amd64/Packages.gz Processed: http://httpredir.debian.org/debian/dists/jessie/non-free/binary-amd64/Packages.gz writing: /home/rajulocal/.cache/grep_insalled/jessie.gz Step 2: Query the cache on the list of installed packages % dpkg -l | grep '^ii' | awk '{print $2}' | grep_installed.py --exclude-dists 'jessie' Could you give it a try and let me know what you think? The script can be downloaded from https://gitlab.com/d3k2mk7/rutils/blob/master/bin/grep_installed.py . Running it with -h option gives the set of options and some sample commands. thanks raju -- Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog