PC-BSD Package Management

A couple days ago I started playing with a PC-BSD appliance. There's an icon on the desktop for AppCafe which is their slightly ugly, slow, and awkward to navigate GUI for package management. I didn't like it, so I set out to find out about package management from the command line.

  • the command is pkg
  • for info about an installed package pkg info openbox (doesn't work with packages that exist in the repositories but aren't installed)
  • pkg install dwm installs an existing package
  • for users of apt and opkg and yum and tazpkg (in fact, all Linux package managers that I know) - major change, it looks like pkg checks and auto-updates its local information from the repositories as needed (all those others I named need you to do it by hand before installing packages - except maybe yum, which was painfully slow to even check the last time I tried it)
  • pkg delete <package-name> is for removing packages
  • also nice is that, while it does locally cache copies of downloaded binary packages, it cleans up after itself and only keeps copies that are current (apt doesn't do this - I've seen half a Gigabyte of cached packages cluttering a hard drive)
  • to totally clear the package cache, run pkg clean -a
  • look for a partial name match in remote repos: pkg search kerberos