pkg管理

作成:2021年03月10日

pkg管理

ホストOS:Debian GNU/Linux 10.7
ゲストOS:FreeBSD 12.2-RELEASE r366954 GENERIC amd64 

参考URL:FreeBSD ハンドブック 4.4. pkg によるバイナリ package の管理

ソフトウェアのインストールには、次世代の管理ツールであるpkgを使用する。

■パッケージをすべて最新にする。
▼リモートリポジトリデータベースをアップデート

# pkg update

▼インストールされているパッケージのバイナリアップデート

# pkg upgrade

【メモ】
▼リポジトリのカタログのダウンロードを強制

# pkg update -f

▼リモートデータベースをパッケージ検索

# pkg search

・実際に、pkg searchで日本語全文検索システムnamazuを検索した結果

# pkg search namazu
ja-namazu-1.3.0.11_1           Search engine software intended for easy use
ja-namazu2-2.0.21_1            Meta-port of Namazu and Japanese support modules
namazu2-2.0.21_2               Full-text search system intended for easy use
p5-Search-Namazu-0.96_5        Namazu library module for perl

▼インストールされているパッケージに関する情報を表示

# pkg info

・実際に、pkg infoを実行した結果

# pkg info
alsa-lib-1.1.2_2               ALSA compatibility library
ap24-mod_security-2.9.3        Intrusion detection and prevention engine
apache24-2.4.46                Version 2.4.x of Apache web server
apr-1.7.0.1.6.1_1              Apache Portability Library
autoconf-2.69_3                Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
awstats-7.8,1                  Free real-time logfile analyzer to get advanced web statistics
bash-5.0.18_3                  GNU Project's Bourne Again SHell
bash-completion-2.11,2         Programmable completion library for Bash
bind-tools-9.16.10             Command line tools from BIND: delv, dig, host, nslookup...
bind916-9.16.10                BIND DNS suite with updated DNSSEC and DNS64
boost-libs-1.72.0_2            Free portable C++ libraries (without Boost.Python)
ca_root_nss-3.58               Root certificate bundle from the Mozilla Project
curl-7.74.0                    Command line tool and library for transferring data with URLs
cvsps-2.1_2                    Create patchset information from CVS
db5-5.3.28_7                   Oracle Berkeley DB, revision 5.3
dejavu-2.37_1                  Bitstream Vera Fonts clone with a wider range of characters
dialog4ports-0.1.6             Console Interface to configure ports
docbook-1.5                    Meta-port for the different versions of the DocBook DTD
docbook-sgml-4.5_1             DocBook SGML DTD
docbook-to-man-1.0_2           DocBook SGML DTD into nroff/troff -man macros converter
docbook-xml-5.0_3              DocBook XML DTD
encodings-1.0.5,1              X.Org Encoding fonts
expat-2.2.8                    XML 1.0 parser written in C
font-bh-ttf-1.0.3_4            X.Org Bigelow & Holmes TTF font
font-misc-ethiopic-1.0.4       X.Org miscellaneous Ethiopic font
font-misc-meltho-1.0.3_4       X.Org miscellaneous Meltho font
fontconfig-2.13.92_2,1         XML-based font configuration API for X Windows
freetype2-2.10.4               Free and portable TrueType font rendering engine
fstrm-0.6.0                    Implementation of the Frame Streams data transport protocol in C
galera26-26.4.5                Synchronous multi-master replication engine
gccmakedep-1.0.3               Create dependencies in makefiles using 'gcc -M'
gdbm-1.18.1_1                  GNU database manager
gettext-runtime-0.21           GNU gettext runtime libraries and programs
gettext-tools-0.21             GNU gettext development and translation tools
giflib-5.2.1                   Tools and library routines for working with GIF images
git-2.28.0                     Distributed source code management tool
glib-2.66.0_2,1                Some useful routines of C programming (current stable version)
gmake-4.3_2                    GNU version of 'make' utility
gmp-6.2.0                      Free library for arbitrary precision arithmetic
gnupg-2.2.23                   Complete and free PGP implementation
gnutls-3.6.15                  GNU Transport Layer Security library
help2man-1.47.16               Automatically generating simple manual pages from program output
icu-67.1,1                     International Components for Unicode (from IBM)
imake-1.0.8,1                  Imake and other utilities from X.Org
indexinfo-0.3.1                Utility to regenerate the GNU info page index
iplog-2.2.3_3                  TCP/IP traffic logging tool
iso8879-1986_3                 Character entity sets from ISO 8879:1986 (SGML)
ja-mecab-0.996_3               Yet Another Part-of-Speech and Morphological Analyzer
ja-p5-MeCab-0.996_2            MeCab library module for Perl5
ja-p5-nkf-2.1.4,1              Perl extension module to use NKF
jade-1.2.1_10                  Object-oriented SGML/XML parser toolkit and DSSSL engine
jansson-2.13.1                 C library for encoding, decoding, and manipulating JSON data
java-zoneinfo-2020.d           Updated Java timezone definitions
javavmwrapper-2.7.6            Wrapper script for various Java Virtual Machines
jbigkit-2.1_1                  Lossless compression for bi-level images such as scanned pages, faxes
jpeg-turbo-2.0.5               SIMD-accelerated JPEG codec which replaces libjpeg
json-c-0.15                    JSON (JavaScript Object Notation) implementation in C
lcms2-2.11_1                   Accurate, fast, and small-footprint color management engine
libICE-1.0.10,1                Inter Client Exchange library for X11
libSM-1.2.3,1                  Session Management library for X11
libX11-1.6.12,1                X11 library
libXau-1.0.9                   Authentication Protocol library for X11
libXdmcp-1.1.3                 X Display Manager Control Protocol library
libXext-1.3.4,1                X11 Extension library
libXfixes-5.0.3_2              X Fixes extension library
libXi-1.7.10,1                 X Input extension library
libXrandr-1.5.2                X Resize and Rotate extension library
libXrender-0.9.10_2            X Render extension library
libXt-1.2.0,1                  X Toolkit library
libXtst-1.2.3_2                X Test extension
libargon2-20190702             Memory hard password hashing program and library
libassuan-2.5.3                IPC library used by GnuPG and gpgme
libedit-3.1.20191231,1         Command line editor library
libevent-2.1.12                API for executing callback functions on events or timeouts
libffi-3.3_1                   Foreign Function Interface
libfontenc-1.1.4               The fontenc Library
libgcrypt-1.8.5                General purpose cryptographic library based on the code from GnuPG
libgd-2.3.0,1                  Graphics library for fast creation of images
libgpg-error-1.39              Common error values for all GnuPG components
libiconv-1.16                  Character set conversion library
libidn2-2.3.0_1                Implementation of IDNA2008 internationalized domain names
libinotify-20180201_2          Kevent based inotify compatible library
libksba-1.4.0                  Library to make X.509 certificates
liblockfile-1.16               Standard lockfile library
liblz4-1.9.2_1,1               LZ4 compression library, lossless and very fast
libnghttp2-1.41.0              HTTP/2.0 C Library
libpthread-stubs-0.4           Weak aliases for pthread functions
libtasn1-4.16.0                ASN.1 structure parser library
libtextstyle-0.21              Text styling library
libunistring-0.9.10_1          Unicode string library
libuv-1.40.0                   Multi-platform support library with a focus on asynchronous I/O
libxcb-1.14_1                  The X protocol C-language Binding (XCB) library
libxml2-2.9.10_1               XML parser library for GNOME
libzip-1.5.2                   C library for reading, creating, and modifying ZIP archives
lmdb-0.9.24_3,1                OpenLDAP Lightning Memory-Mapped Database
lockfile-progs-0.1.18          Programs for locking and unlocking files and mailboxes
logcheck-1.3.20                Auditing tool for system logs on Unix boxes
m4-1.4.18_1,1                  GNU M4
makedepend-1.0.6,1             Dependency generator for makefiles
mariadb105-client-10.5.8       Multithreaded SQL database (client)
mariadb105-server-10.5.8       Multithreaded SQL database (server)
mime-construct-1.11_2          Construct and optionally send MIME messages from command line
mkfontscale-1.2.1              Creates an index of scalable font files for X
mod_php74-7.4.13               PHP Scripting Language
nettle-3.6                     Low-level cryptographic library
npth-1.6                       New GNU Portable Threads
oniguruma-6.9.5.r1_1           Regular expressions library compatible with POSIX/GNU/Perl
openjdk11-11.0.9+11.1_2        Java Development Kit 11
p11-kit-0.23.21                Library for loading and enumerating of PKCS#11 modules
p5-Authen-SASL-2.16_1          Perl5 module for SASL authentication
p5-CGI-4.50                    Handle Common Gateway Interface requests and responses
p5-Digest-HMAC-1.03_1          Perl5 interface to HMAC Message-Digest Algorithms
p5-Error-0.17029               Error/exception handling in object-oriented programming style
p5-File-MMagic-1.30_1          Perl5 module to guess file type like file(1)
p5-GSSAPI-0.28_1               Perl extension providing access to the GSSAPIv2 library
p5-HTML-Parser-3.72            Perl5 module for parsing HTML documents
p5-HTML-Tagset-3.20_1          Some useful data table in parsing HTML
p5-IO-Socket-INET6-2.72_1      Perl module with object interface to AF_INET6 domain sockets
p5-IO-Socket-SSL-2.068         Perl5 interface to SSL sockets
p5-IPC-Signal-1.00_1           Utility functions to deal with signals in Perl
p5-Locale-gettext-1.07         Message handling functions
p5-Locale-libintl-1.31         Internationalization library for Perl
p5-MIME-Types-2.18             Perl extension for determining MIME types
p5-Mozilla-CA-20200520         Perl extension for Mozilla CA cert bundle in PEM format
p5-Net-DNS-1.27,1              Perl5 interface to the DNS resolver, and dynamic updates
p5-Net-IP-1.26_1               Perl extension for manipulating IPv4/IPv6 addresses
p5-Net-SSLeay-1.88             Perl5 interface to SSL
p5-Net-XWhois-0.90_5           Whois Client Interface for Perl5
p5-Proc-WaitStat-1.00_1        Interpret and act on wait() status values
p5-Socket6-0.29                IPv6 related part of the C socket.h defines and structure manipulators
p5-Term-ReadKey-2.38_1         Perl5 module for simple terminal control
p5-Text-Unidecode-1.30         US-ASCII transliterations of Unicode text
p5-Unicode-EastAsianWidth-12.0 East Asian Width properties
p5-subversion-1.14.0           Perl bindings for Version control system
pcre-8.44                      Perl Compatible Regular Expressions library
pcre2-10.35                    Perl Compatible Regular Expressions library, version 2
perl5-5.32.0                   Practical Extraction and Report Language
php74-7.4.13                   PHP Scripting Language
php74-bz2-7.4.13               The bz2 shared extension for php
php74-ctype-7.4.13             The ctype shared extension for php
php74-curl-7.4.13              The curl shared extension for php
php74-dom-7.4.13               The dom shared extension for php
php74-fileinfo-7.4.16          The fileinfo shared extension for php
php74-filter-7.4.13            The filter shared extension for php
php74-gd-7.4.13                The gd shared extension for php
php74-json-7.4.13              The json shared extension for php
php74-mbstring-7.4.13          The mbstring shared extension for php
php74-mysqli-7.4.13            The mysqli shared extension for php
php74-openssl-7.4.13           The openssl shared extension for php
php74-pdo-7.4.14               The pdo shared extension for php
php74-pdo_sqlite-7.4.14        The pdo_sqlite shared extension for php
php74-session-7.4.13           The session shared extension for php
php74-simplexml-7.4.13         The simplexml shared extension for php
php74-xml-7.4.13               The xml shared extension for php
php74-xmlreader-7.4.13         The xmlreader shared extension for php
php74-zip-7.4.13               The zip shared extension for php
php74-zlib-7.4.13              The zlib shared extension for php
phpMyAdmin-php74-4.9.5         Set of PHP-scripts to manage MySQL over the web
pinentry-1.1.0_6               Collection of simple PIN or passphrase entry dialogs
pinentry-tty-1.1.0             Console version of the GnuPG password dialog
pkg-1.16.3                     Package manager
pkgconf-1.7.3,1                Utility to help to configure compiler and linker flags
png-1.6.37                     Library for manipulating PNG images
protobuf-3.13.0,1              Data interchange format library
protobuf-c-1.3.2_6             Code generator and libraries to use Protocol Buffers from pure C
py27-acme-1.8.0,1              ACME protocol implementation in Python
py27-asn1crypto-1.3.0          ASN.1 library with a focus on performance and a pythonic API
py27-certbot-1.8.0,1           Let's Encrypt client
py27-certbot-dns-rfc2136-1.8.0 RFC 2136 DNS Authenticator plugin for Certbot
py27-certifi-2020.6.20         Mozilla SSL certificates
py27-cffi-1.14.3               Foreign Function Interface for Python calling C code
py27-chardet-3.0.4_3           Universal encoding detector for Python 2 and 3
py27-configargparse-1.2.3      Drop-in replacement for argparse
py27-configobj-5.0.6_1         Simple but powerful config file reader and writer
py27-cryptography-2.6.1        Cryptographic recipes and primitives for Python developers
py27-distro-1.5.0              Linux OS platform information API
py27-dnspython-1.16.0          DNS toolkit for Python
py27-enum34-1.1.10             Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7
py27-funcsigs-1.0.2            Python function signatures from PEP362
py27-idna-2.8                  Internationalized Domain Names in Applications (IDNA)
py27-ipaddress-1.0.23          Port of Python 3.3+ ipaddress module to 2.7
py27-josepy-1.4.0              JOSE protocol implementation in Python
py27-mock-3.0.5                Rolling backport of unittest.mock for all Pythons
py27-openssl-19.0.0            Python interface to the OpenSSL library
py27-parsedatetime-2.6         Python module for parsing 'human readable' date/time expressions
py27-pycparser-2.20            C parser in Python
py27-pyrfc3339-1.1             Generate and parse RFC 3339 timestamps
py27-pysocks-1.7.1             Python SOCKS module
py27-pytz-2020.1,1             World Timezone Definitions for Python
py27-requests-2.22.0           HTTP library written in Python for human beings
py27-requests-toolbelt-0.9.1   Utility belt for advanced users of python-requests
py27-setuptools-44.0.0         Python packages installer
py27-six-1.15.0                Python 2 and 3 compatibility utilities
py27-urllib3-1.25.11,1         HTTP library with thread-safe connection pooling, file post, and more
py27-zope.component-4.2.2      Zope Component Architecture
py27-zope.event-4.1.0          Very basic event publishing system
py27-zope.interface-4.6.0      Interfaces for Python
py37-acme-1.8.0,1              ACME protocol implementation in Python
py37-asn1crypto-1.3.0          ASN.1 library with a focus on performance and a pythonic API
py37-certbot-1.8.0,1           Let's Encrypt client
py37-certbot-dns-rfc2136-1.8.0 RFC 2136 DNS Authenticator plugin for Certbot
py37-certifi-2020.6.20         Mozilla SSL certificates
py37-cffi-1.14.3               Foreign Function Interface for Python calling C code
py37-chardet-3.0.4_3           Universal encoding detector for Python 2 and 3
py37-configargparse-1.2.3      Drop-in replacement for argparse
py37-configobj-5.0.6_1         Simple but powerful config file reader and writer
py37-cryptography-2.6.1        Cryptographic recipes and primitives for Python developers
py37-distro-1.5.0              Linux OS platform information API
py37-dnspython-1.16.0          DNS toolkit for Python
py37-idna-2.8                  Internationalized Domain Names in Applications (IDNA)
py37-josepy-1.4.0              JOSE protocol implementation in Python
py37-mock-3.0.5                Rolling backport of unittest.mock for all Pythons
py37-openssl-19.0.0            Python interface to the OpenSSL library
py37-parsedatetime-2.6         Python module for parsing 'human readable' date/time expressions
py37-ply-3.11                  Python Lex-Yacc
py37-pycparser-2.20            C parser in Python
py37-pyrfc3339-1.1             Generate and parse RFC 3339 timestamps
py37-pysocks-1.7.1             Python SOCKS module
py37-pytz-2020.1,1             World Timezone Definitions for Python
py37-requests-2.22.0           HTTP library written in Python for human beings
py37-requests-toolbelt-0.9.1   Utility belt for advanced users of python-requests
py37-setuptools-44.0.0         Python packages installer
py37-six-1.15.0                Python 2 and 3 compatibility utilities
py37-urllib3-1.25.11,1         HTTP library with thread-safe connection pooling, file post, and more
py37-zope.component-4.2.2      Zope Component Architecture
py37-zope.event-4.1.0          Very basic event publishing system
py37-zope.interface-4.6.0      Interfaces for Python
python27-2.7.18_1              Interpreted object-oriented programming language
python37-3.7.9                 Interpreted object-oriented programming language
qjail-5.4                      Utility to quickly deploy and manage jails
readline-8.0.4                 Library for editing command lines as they are typed
rsync-3.2.3                    Network file distribution/synchronization utility
sdocbook-xml-1.1_2,2           "Simplified" DocBook XML DTD
serf-1.3.9_5                   Serf HTTP client library
sqlite3-3.33.0,1               SQL database engine in a C library
subversion-1.14.0              Version control system
texinfo-6.7_4,1                Typeset documentation system with multiple format output
tiff-4.1.0                     Tools and library routines for working with TIFF images
tpm-emulator-0.7.4_2           Trusted Platform Module (TPM) emulator
tradcpp-0.5.3                  Traditional (K&R-style) C preprocessor
trousers-0.3.14_3              Open-source TCG Software Stack
unixODBC-2.3.7                 ODBC library suite for Unix
unzip-6.0_8                    List, test, and extract compressed files from a ZIP archive
utf8proc-2.5.0                 UTF-8 processing library
webp-1.1.0                     Google WebP image format conversion tool
wget-1.20.3                    Retrieve files from the Net via HTTP(S) and FTP
xmlcatmgr-2.2_2                SGML and XML catalog manager
xmlcharent-0.3_2               XML character entities
xorg-cf-files-1.0.6            X.org cf files for use with imake builds
xorg-fonts-truetype-7.7_1      X.Org TrueType fonts
xorg-macros-1.19.2             X.Org development aclocal macros
xorgproto-2020.1               X Window System unified protocol definitions
xxhash-0.8.0                   Extremely fast non-cryptographic hash algorithm
yajl-2.1.0                     Portable JSON parsing and serialization library in ANSI C
zstd-1.4.5_1                   Fast real-time compression algorithm

▼パッケージのアンインストール

# pkg delete

▼インストール時に発生するパッケージキャッシュの消去

# pkg clean