s33. FreeBSD pkg

List of useful tips related to pkg command

#  System update

   pkg update
   pkg upgrade

#  First update local packages database, than upgrade all outdated installed packages.

#  List of installed ports

   pkg query --all '%o %n-%v %R'

#  The last column is the name of repository the package was installed
#  from, it'll be FreeBSD for official packages and unknown-repository
#  for locally built ports.

# List of outdated ports

   pkg version -vRL=

#  Lock and unlock ports

   pkg lock seahub
   pkg unlock seahub

#  These commands protects package to be changed during upgrade
#  process. For example, when you create a package from ports with
#  different settings than precompiled binary package has in remote
#  repository.

#   Package info

   pkg info name_of_package

# Command will display info about installed package and his actual settings.


#  Use latest repo


#  Since FreeBSD 10.2, pkg points to a quaterly repo.


#  To switch repos edit /etc/pkg/FreeBSD.conf to point at the latest repo, as it used to before 10.2 Change the line:


#  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",


#  To:

#  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",


[s33. FreeBSD pkg, last update 2017-12-06]