pkg
pkg セットアップ
#pkg The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg please wait Installing pkg-1.1.4_8... done If you are upgrading from the old package format, first run: # pkg2ng usage: pkg [-v] [-d] [-l] [-N] [-j|-c ] [-C ] [ ] Global options supported: -d Increment debug level -j Execute pkg(1) inside a jail(8) -c Execute pkg(1) inside a chroot(8) -C Use the specified configuration file -l List available command and exit -v Display pkg(1) version -N Test if pkg(1) is activated and avoid auto-activation Commands supported: add Registers a package and installs it on the system annotate Add, modify or delete tag-value style annotations on packages audit Reports vulnerable packages autoremove Removes orphan packages backup Backs-up and restores the local package database check Checks for missing dependencies and database consistency clean Cleans old packages from the cache convert Convert database from/to pkgng create Creates software package distributions delete Deletes packages from the database and the system fetch Fetches packages from a remote repository help Displays help information info Displays information about installed packages install Installs packages from remote package repositories lock Locks package against modifications or deletion plugins Manages plugins and displays information about plugins query Queries information about installed packages register Registers a package into the local database remove Deletes packages from the database and the system repo Creates a package repository catalogue rquery Queries information in repository catalogues search Performs a search of package repository catalogues set Modifies information about packages in the local database ssh ssh packages to be used via ssh shell Opens a debug shell shlib Displays which packages link against a specific shared library stats Displays package database statistics unlock Unlocks a package, allowing modification or deletion update Updates package repository catalogues updating Displays UPDATING information for a package upgrade Performs upgrades of packaged software distributions version Displays the versions of installed packages which Displays which package installed a specific file Commands provided by plugins: For more information on the different commands see 'pkg help '.
pkg2ng で既存の package を新しい形式に移行する。
# rehash # pkg2ng Converting packages from /var/db/pkg Converting portmaster-3.14_8... pkg: unknown keyword display, ignoring @display Installing portmaster-3.14_8... done
リポジトリの更新
# pkg update Updating repository catalogue digests.txz 100% 1016KB 1.0MB/s 546.4KB/s 00:01 packagesite.txz 100% 5692KB 1.1MB/s 522.1KB/s 00:05 Incremental update completed, 0 packages processed: 0 packages updated, 0 removed and 23014 added.
package の更新
# pkg upgrade Updating repository catalogue Upgrades have been requested for the following 104 packages: Installing libiconv: 1.14_1 Upgrading autoconf-wrapper: 20101119 -> 20130530 Upgrading automake-wrapper: 20101119 -> 20130530 Upgrading bigreqsproto: 1.1.1 -> 1.1.2 Upgrading bonnie++: 1.96_1 -> 1.97 Installing graphite2: 1.2.3 Installing icu: 50.1.2 ~~~~~~ The upgrade will require 66 MB more space 82 MB to be downloaded Proceed with upgrading packages [y/N]: y
package の変更・削除などを禁止するには
pkg lock pkg-name