List of available packages

Hi,

Sorry if this question is too naive, I've been googling for this information but couldn't find any solution :)

How can I determine the list of available packages that are not installed?

I know with pkg_info I can get the list of the installed packages, is there a similar command to get the list of packages not installed?

Thanks!
 
You can find a list of available packages here. Look in the architecture/branch/All directory for your case. For example ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-stable/All/.

Note, these are the available pre-built packages. If you want a list of ports that are available for you to build, you can look in /usr/ports (assuming you have a local ports tree). Something like cd /usr/ports; find . -depth 2 will give you a list. Take note, there are close to 25,000 of them. If you want to search for a port you can do something like [cmd="/usr/ports $ "]make search key="emacs"[/cmd] or use freebsd.org/ports or freshports.org.
 
Not very smart, but it works:
Code:
% pkg search -g \* | wc -l
23154

You can maybe filter the list with the output of pkg info.
 
jrm said:
You can find a list of available packages here. Look in the architecture/branch/All directory for your case. For example ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-stable/All/.

I've looked into the url you mentioned but I think this list is not complete (at least, apache22 is missing).

Probably I haven't explained myself what I wanted (sorry, english is not my first language :) ); for example, in RedHat, I can list all the available packages with this command:

Code:
yum list available

Is there anything similar in FreeBSD?

Thanks!
 
Sorry, disregard my previous message; I've looked into ia64 instead of amd64 :) in amd64 there is apache22.

It's unfortunate that there is no a simple command to get what I need but I can create a small perl script to fetch that information.

Thanks!
 
tvs said:
It's unfortunate that there is no a simple command to get what I need but I can create a small perl script to fetch that information.

I’m curious: what features of yum (which I don’t know) are missing for you in pkg?
 
Hi,

You can try to install software using packages:

pkg_add -r apache22

it will download and install apache22 including all dependencies. Or do you need something like RedHat's yum groupinstall to install all available binary packages of some group ?
 
tvs said:
Sorry, disregard my previous message; I've looked into ia64 instead of amd64 :) in amd64 there is apache22.

It's unfortunate that there is no a simple command to get what I need but I can create a small perl script to fetch that information.

Thanks!

Juanitou said:
I’m curious: what features of yum (which I don’t know) are missing for you in pkg?

For example, the possibility of quickly list all available packages in the repository that are not installed on my server.
 
tvs said:
For example, the possibility of quickly list all available packages in the repository that are not installed on my server.

How often is that actually useful? Not trying to be rude or anything, but generally interested. The only feature I've liked from yum that doesn't exist in other package managers is yum-presto.

I'm actually quite happy with the feature set of pkgng because it's very similar to Arch's pacman, which I use on my laptop now.
 
beatgammit said:
How often is that actually useful? Not trying to be rude or anything, but generally interested.

Well, it's VERY useful to me for several different reasons ... how do you know for example if something you need has a package in FreeBSD and what name it has? I'm currently automating (using salt) the installation of a very complex application server that needs lots of different backend software ... it's actually a pain to figure out all the dependencies with FreeBSD (specially when you're not used to it); on the other hand, it was a breeze to obtain all the information I need in both Debian and CentOS.
 
If you want to just find out if there is a package for something (and happens to be in the package repo) then it's this simple:

pkg search nginx

Granted it does not tell you if the packate is already installed on the local system.

If there's no package in package repo for the piece of software you need you can use the ports tree to search for a port of it:

cd /usr/ports
make search name=apache22

If you have no ports tree installed you can use http://www.freshports.org to search for a port.

Btw, list of all packages that are not installed is an ambiguous term because it depends on which remote repository you're using. There's absolutely no way that every single port from the ports tree is made into a package, even the official repositories will have only the most popular ports and the rest of the ports would not show up in a list of non-installed packages. In other words, the repository catalogue of packages is not the same as the port catalogue, only a subset of it.
 
Back
Top