Quantcast
Channel: How can I get *ALL* the info for available packages in apt at once? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

Answer by user535733 for How can I get *ALL* the info for available packages in apt at once?

$
0
0

One easy answer to your question is to use dpkg instead of apt. apt will happily do all the logic and keep track of the versions precisely so you needn't muck around with such tedious details.

This particular command shows currently-installed versions, not available-for-upgrade (use apt list --upgradeable for that)

Try dpkg -l | grep ii | awk '{print$2, $3}' | sed 's/ /, /'

  • Use dpkg -l to get the complete list of packages and versions in your package database
  • Limit the output by showing only installed (ii) packages: grep ii
  • Use awk to print only the second and third columns with : awk '{print$2, $3}'
  • Insert your comma using sed: sed 's/ /, /'

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>