pkg-search to show different versions of a package

Hello! On OpenSUSE I have:
Code:
# zypper se -s /^mysql-community-server/
Reading installed packages...

S  | Name                         | Type    | Version       | Arch   | Repository
---+------------------------------+---------+---------------+--------+---------------------------
i+ | mysql-community-server       | package | 8.0.44-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.43-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.42-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.41-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.40-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.39-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.37-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.36-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.35-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.34-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.33-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.32-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.31-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.30-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.28-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.27-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.26-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.25-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.24-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.23-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.22-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.21-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.20-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.19-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.18-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.17-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.16-2.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.16-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.15-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.14-1.sl15 | x86_64 | MySQL 8.0 Community Server
v  | mysql-community-server       | package | 8.0.13-1.sl15 | x86_64 | MySQL 8.0 Community Server

Where I can find all versions of a package. Is there a similar on FreeBSD?
I tried `pkg search -Q version` but it only shows the current version.

Any help would be much appreciated!

EDIT: Hmmm, I'm guessing this has to do with ports. tbh, I am not too savvy with ports, I get the idea it works like macports, so for the time being I'm playing around with compiling from source.

EDIT2: reading https://docs.freebsd.org/en/books/handbook/ports/ to see if I can make some quick sense of my question.
 
Last edited by a moderator:
iPodClassic most ports only have one version, the latest available for the FreeBSD release you are running.
Some packages do have multiple versions, not many. The command drhowarddrfine posted will let you search for a string (or check the freshports site).
Though you should be aware that just because you have multiple versions of a package that doesn't mean you can install it. Some packages are dependencies of other packages so if you try to install a newer version you may be forced to remove some other package you need.
If that's the case you can build from source.
 
Old versions of the same package will get deleted before the new package is built. So you will not have more than one version in the repository. Unless that version is part of the actual package name, like net-mgmt/zabbix6-server and ports-mgmt/zabbix7-server. Or databases/postgresql16-server and databases/postgresql17-server.
Thank you again! Yes, I've noticed this is the case. I'm taking the route of downloading the mysql 8.0.44 snapshot from the ports tree and building from there. I am fairly new to FreeBSD (very evident lol) and my experience is based in SLES and Debian (another planet, basically). I am using it everyday to exercise my muscle and brain memory and exploring all its quirks and features.
Next step is to see if I can build a binary package out of the built port so I can install as needed without going through the whole process again.
 
Back
Top