2

I have just started using FreeBSD again after some years of staying away from *BSD based systems (with the exception of macOS). I am using FreeBSD 11.0 and 12.0.

To manage packages, pkg seems rather intuitive, and in fact the commands are pretty similar being pkg update, pkg upgrade, pkg search and pkg autoremove.

However, what is the equivalent of apt list or dpkg -l for having a list of the already installed packages? I somewhat remember and have found a page detailing it is pkg_info, however the command is not working.

5

pkg_info usage is deprecated, and hence your confusion.

In fact, the appropriate command to list the already installed FreeBSD packages is pkg info.

From man pkg

info Display information about installed packages.

$ pkg info | tail
python27-2.7.13_1              Interpreted object-oriented programming language
readline-6.3.8                 Library for editing command lines as they are typed
screen-4.5.0_2                 Multi-screen window manager
sdig-0.45_1                    Translate IP/DNS/WINS/MAC address into port description
tmux-2.3_2                     Terminal Multiplexer
unbound-1.6.1                  Validating, recursive, and caching DNS resolver
vm-bhyve-1.1.5                 Management system for bhyve virtual machines
wget-1.19                      Retrieve files from the Net via HTTP(S) and FTP
xextproto-7.3.0                XExt extension headers
xproto-7.0.31                  X11 protocol headers

Please see the FreeBSD wiki Pkg Primer that details the usage of the pkg command, and the equivalent usage of the deprecated pkg_* commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.