Saturday, May 11, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 814  / 1 Year ago, thu, may 11, 2023, 6:25:41

I want to list all the packages(installed or not installed) along with the latest version number available in the repositories.



For example:



The output of apt-cache policy chromium-browser shows like below



$ apt-cache policy chromium-browser
chromium-browser:
Installed: (none)
Candidate: 34.0.1847.116-0ubuntu2
Version table:
34.0.1847.116-0ubuntu2 0
500 http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty/universe amd64 Packages


So the latest version of chromium-browser package available in the repository is 34.0.1847.116-0ubuntu2. Like that, i want to list the version number along with the package names that are available in repositories. And all i want to do this through command-line.



I want the output to be like this,



chromium-browser 34.0.1847.116-0ubuntu2
xxxxxxxxxxxxxx yyyyyyyyyyy
............ ............

More From » command-line

 Answers
0

apt-cache policy '.*' displays detailed version information for all packages.



If you want a more compact output with one line per package, you can use aptitude. The following command lists available versions (see the manual for output format specifications) for all packages except cross-architecture ones (e.g. 32-bit packages on a 64-bit system) (see the manual for search patterns):



aptitude search -F '%54p %24V' '~rnative'

[#24922] Friday, May 12, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oleard

Total Points: 344
Total Questions: 105
Total Answers: 113

Location: Bonaire
Member since Tue, Sep 20, 2022
2 Years ago
oleard questions
Mon, Sep 26, 22, 18:21, 2 Years ago
Mon, Nov 1, 21, 21:27, 3 Years ago
Sat, May 7, 22, 20:47, 2 Years ago
Sun, Oct 2, 22, 01:10, 2 Years ago
;