22

I want to get a list of all available versions of a package, the same list that you can see in Yast, but using zypper.

OpenSuse 13.1, zypper 1.9.16

ShadSterling
  • 1,459
  • 1
  • 11
  • 20

1 Answers1

28

Use search -s. For example, sudo zypper search -s fortune might give this output:

Loading repository data...
Reading installed packages...

S | Name    | Type       | Version      | Arch   | Repository                    
--+---------+------------+--------------+--------+-------------------------------
i | fortune | package    | 1.99.1-6.1.4 | x86_64 | 13.1-OpenSUSE-InstallOss      
i | fortune | package    | 1.99.1-6.1.4 | x86_64 | Tumbleweed-OpenSUSE-InstallOss
v | fortune | package    | 1.99.1-4.1.2 | x86_64 | 12.3-OpenSUSE-Oss             
v | fortune | package    | 1.99.1-6.1.4 | i586   | 13.1-OpenSUSE-InstallOss      
v | fortune | package    | 1.99.1-6.1.4 | i586   | Tumbleweed-OpenSUSE-InstallOss
v | fortune | package    | 1.99.1-4.1.2 | i586   | 12.3-OpenSUSE-Oss             
  | fortune | srcpackage | 1.99.1-6.1.4 | noarch | 13.1-OpenSUSE-SourceOss       
  | fortune | srcpackage | 1.99.1-6.1.4 | noarch | Tumbleweed-OpenSUSE-SourceOss 
  | fortune | srcpackage | 1.99.1-4.1.2 | noarch | 12.3-OpenSUSE-SourceOss       
ShadSterling
  • 1,459
  • 1
  • 11
  • 20
  • 9
    Since I just had to look it up: The **S** in the header of the first column stands for "Status". The values are: **i** -> Installed. **v** -> Another version installed. Blank space -> Neither – twobeers May 13 '16 at 11:40
  • 3
    ... and **i+** means package installed by user request – linux64kb Oct 10 '22 at 06:41