I have a system which is a mishmash of testing and unstable and some from experimental.

How can I get a list of which packages I've installed from experimental?

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

Answering my own question.

I came up with this solution:

aptitude -t experimental search -F '%p %?V %?v %?t' --disable-columns .|\
grep -v none| \
grep experimental| \
awk '{if( $2 == $3) print $1}'

The aptitude line gets me a list with "package name(%p)", "version if upgrade to experimental(%?V)", "installed version(%?v)" and "archives(%?t)".

Then filter away packages which are not installed.

And keep only packages which are available in experimental.

If installed and upgradable version are the same we have a winner.

link|improve this answer
feedback

There might be an easy way to do that, but if there isn't this might work to get you close:

  • Get all package names and versions from dpkg --list
  • Comment out all sources but stable in your apt sources, and then apt-get update
  • Search for all the installed package in the dpkg list, if it isn't there that is one. else use --compare-versions to dpkg to see if you have is newer than what is returned from apt.

I hope for your sake there is a better way ;-)

link|improve this answer
Oh, and if this is just because your system is all messed up, you might just want to start over. – Kyle Brandt Nov 24 '09 at 16:57
My system works as it should. Just realized I had no idea how far from unstable I'd gone. – peje Nov 24 '09 at 17:51
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.