OpenBSD-101: Locating software


#1

When you first install openbsd you are give 4 pkg utilities;

  • pkg_add : add a package
  • pkg_delete : remove a package
  • pkg_info : information about an installed package
  • pkg_create: used for creating packages.

But what if you wanted to search for a package? Well never fear, openbsd has a utility for that also. However we must first install that utility which happens to be called pkglocatedb. You can accomplish this by typing in

pkg_add pkglocatedb

Now that you have the utility installed you are given a new utility called pkg_locate. This utility will search the repositories for keywords or even filenames. An example search could be

pkg_locate vim

This search will bring up all packages with vim in the name, description, or contains a file with the name vim in it.

I hope this short tutorial helps those new to openbsd.


#2

This is really helpful for new users of OpenBSD. Thanks @bsdtux


#3

thank you. To be honest it was one of the first things that I fumbled through on my path to learning OpenBSD. I am still pretty new to openbsd (as in probably 2 months in). I dabbled in the BSD’s for a while but mostly used Mac and Linux since around 2003. However I am working to make OpenBSD my daily driver and as I discover new things I am hoping to share those on here.


#4

Also pkg_info with -Q can be used for query of packages as suggested by @blakkheim

@blakkheim: @jaypatelvipl no need to install other stuff, just pkg_info -Q vim

https://twitter.com/blakkheim/status/815062110925426688