Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

You can use aptitude search "~S~i~Aexperimental"

share|improve this answer
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.

share|improve this answer

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 ;-)

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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