new version of adoc and xml.

This commit is contained in:
Jason S. Evans 2016-03-30 08:18:49 +00:00
parent 20444ba81b
commit 18b0b9596f
4 changed files with 782 additions and 117 deletions

View File

@ -18,6 +18,7 @@ The original version of this guide can be found at https://www.digitalocean.com/
|=============================================================================
|15.1.2016 |v1.0 Converted and edited for TLDP |Jason Evans
|15.2.2016 |v1.1 Changed format to asciidoc and made corrections |Jason Evans
|30.3.2016 |v1.2 Added documentation for SuSE, Abstract section, and expanded overview, also many small typographical changes and corrections.| Jason Evans
|=============================================================================
==== Contributions
@ -107,11 +108,11 @@ While their functionality and benefits are broadly similar, packaging formats an
|FreeBSD |Ports, .txz |make, pkg
|===========================================
In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the .debfile. APT, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.
In Debian and systems based on it such as Ubuntu, Linux Mint, and Raspbian, the package format is the .deb file. Apt, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.
Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been supplanted by dnf, a modernized fork which retains most of yum's interface.
Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been replaced by dnf, a modernized fork which retains most of yum's functionality.
SuSE also uses RPM files. However, the package management software is known as zypper. Zypper's command line interface is very similar to yum and YasT can be access from a graphical mode or from the command line.
SuSE also uses RPM files. However, the package management software is known as zypper. Zypper's command line interface is very similar to yum. SuSE also has a build-in gui called YasT that can handle package management and can be accessed from a graphical mode or from the command line.
FreeBSD's binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It's usually much more convenient to use pkg, but occasionally a pre-compiled package is unavailable, or syou may need to change compile-time options.
@ -268,8 +269,7 @@ cross-referenced between systems, but only scratches the surface of a
complex topic. For greater detail on a given system, you can consult the
following resources:
1. https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials[This
guide] covers Ubuntu and Debian package management in detail.
1. This https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials[guide] covers Ubuntu and Debian package management in detail.
2. There's an https://www.centos.org/docs/5/html/yum/[official CentOS guide to managing software with yum].
3. There's a https://fedoraproject.org/wiki/Dnf[Fedora wiki page about dnf], and an https://dnf.readthedocs.org/en/latest/index.html[official manual for dnf itself]
4. https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg[This guide] covers FreeBSD package management using pkg.

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?asciidoc-toc?>
<?xml version="1.0" encoding="UTF-8"?><?asciidoc-toc?>
<?asciidoc-numbered?>
<article xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<info>
<title>Package Management Basics</title>
<subtitle>apt, yum, dnf, zypper, and pkg</subtitle>
<date>2016-03-21</date>
<date>2016-03-30</date>
</info>
<section xml:id="_abstract">
<title>Abstract</title>
@ -17,15 +16,15 @@
</section>
<section xml:id="_original_version_of_this_doc">
<title>Original version of this doc</title>
<simpara>The original version of this guide can be found at <link xl:href="https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg">Digital Ocean</link>.</simpara>
<simpara>The original version of this guide can be found at <link xlink:href="https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg">Digital Ocean</link>.</simpara>
</section>
<section xml:id="_revision_history">
<title>Revision History</title>
<informaltable frame="all" rowsep="1" colsep="1">
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<tbody>
<row>
<entry align="center" valign="top"><simpara>15.1.2016</simpara></entry>
@ -37,6 +36,11 @@
<entry align="center" valign="top"><simpara>v1.1 Changed format to asciidoc and made corrections</simpara></entry>
<entry align="center" valign="top"><simpara>Jason Evans</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>30.3.2016</simpara></entry>
<entry align="center" valign="top"><simpara>v1.2 Added documentation for SuSE, Abstract section, and expanded overview, also many small typographical changes and corrections.</simpara></entry>
<entry align="center" valign="top"><simpara>Jason Evans</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
@ -45,11 +49,11 @@
<title>Contributions</title>
<itemizedlist>
<listitem>
<simpara><link xl:href="https://www.digitalocean.com/community/users/bpb">Brennen Bearnes</link>
<simpara><link xlink:href="https://www.digitalocean.com/community/users/bpb">Brennen Bearnes</link>
(original author).</simpara>
</listitem>
<listitem>
<simpara><link xl:href="http://wiki.tldp.org/Jason%20Evans">Jason Evans</link> (editor and maintainer for TLDP)</simpara>
<simpara><link xlink:href="http://wiki.tldp.org/Jason%20Evans">Jason Evans</link> (editor and maintainer for TLDP)</simpara>
</listitem>
</itemizedlist>
</section>
@ -59,7 +63,7 @@
</section>
<section xml:id="_copyright_information">
<title>Copyright information</title>
<simpara>This work is licensed under a <link xl:href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</link>.</simpara>
<simpara>This work is licensed under a <link xlink:href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</link>.</simpara>
</section>
<section xml:id="_introduction">
<title>Introduction</title>
@ -67,7 +71,7 @@
<title>Why was this document written?</title>
<simpara>Most modern Unix-like operating systems offer a centralized mechanism for finding and installing software. Software is usually distributed in the form of packages, kept in repositories. Working with packages is known as package management. Packages provide the basic components of an operating system, along with shared libraries, applications, services, and documentation.</simpara>
<simpara>A package management system does much more than one-time installation of software. It also provides tools for upgrading already-installed packages. Package repositories help to ensure that code has been vetted for use on your system, and that the installed versions of software have been approved by developers and package maintainers.</simpara>
<simpara>When configuring servers or development environments, it&#8217;s often necessary look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous
<simpara>When configuring servers or development environments, its often necessary look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous
resource.</simpara>
</section>
<section xml:id="_what_do_you_need">
@ -79,7 +83,7 @@ resource.</simpara>
</section>
<section xml:id="_package_management_systems_a_brief_overview">
<title>Package Management Systems: A Brief Overview</title>
<simpara>In a Windows environment, programs are packaged in .exe or .msi installers which will then install most of the files needed to run the program. If your computer doesn&#8217;t have some dependant applications, then the program that you are trying to run will either not install or not run properly. You will then have to scour the internet in order to find the missing required applications or libraries. For example in CentOS 7, in order to install the VIM text editor, I need to add the following packages:</simpara>
<simpara>In a Windows environment, programs are packaged in .exe or .msi installers which will then install most of the files needed to run the program. If your computer doesnt have some dependant applications, then the program that you are trying to run will either not install or not run properly. You will then have to scour the internet in order to find the missing required applications or libraries. For example in CentOS 7, in order to install the VIM text editor, I need to add the following packages:</simpara>
<literallayout class="monospaced"> gpm-libs x86_64 1.20.7-5.el7 base 32 k
groff-base x86_64 1.22.2-8.el7 base 942 k
perl x86_64 4:5.16.3-286.el7 base 8.0 M
@ -116,11 +120,11 @@ resource.</simpara>
<section xml:id="_some_different_package_management_systems">
<title>Some different package management systems:</title>
<simpara>While their functionality and benefits are broadly similar, packaging formats and tools vary by platform:</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">Operating System</entry>
@ -162,15 +166,15 @@ resource.</simpara>
</tbody>
</tgroup>
</informaltable>
<simpara>In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the .debfile. APT, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.</simpara>
<simpara>Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been supplanted by dnf, a modernized fork which retains most of yum&#8217;s interface.</simpara>
<simpara>SuSE also uses RPM files. However, the package management software is known as zypper. Zypper&#8217;s command line interface is very similar to yum and YasT can be access from a graphical mode or from the command line.</simpara>
<simpara>FreeBSD&#8217;s binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It&#8217;s usually much more convenient to use pkg, but occasionally a pre-compiled package is unavailable, or syou may need to change compile-time options.</simpara>
<simpara>In Debian and systems based on it such as Ubuntu, Linux Mint, and Raspbian, the package format is the .deb file. Apt, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.</simpara>
<simpara>Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been replaced by dnf, a modernized fork which retains most of yums functionality.</simpara>
<simpara>SuSE also uses RPM files. However, the package management software is known as zypper. Zyppers command line interface is very similar to yum. SuSE also has a build-in gui called YasT that can handle package management and can be accessed from a graphical mode or from the command line.</simpara>
<simpara>FreeBSDs binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. Its usually much more convenient to use pkg, but occasionally a pre-compiled package is unavailable, or syou may need to change compile-time options.</simpara>
</section>
<section xml:id="_update_package_lists">
<title>Update Package Lists</title>
<simpara>Most systems keep a local database of the packages available from remote repositories. It&#8217;s best to update this database before installing or upgrading packages. As a partial exception to this pattern, yum and dnf will check for updates before performing some operations, but you can ask them at any time whether updates are available.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<simpara>Most systems keep a local database of the packages available from remote repositories. Its best to update this database before installing or upgrading packages. As a partial exception to this pattern, yum and dnf will check for updates before performing some operations, but you can ask them at any time whether updates are available.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="2">
<colspec colname="col_1" colwidth="50*"/>
<colspec colname="col_2" colwidth="50*"/>
@ -211,13 +215,13 @@ resource.</simpara>
</section>
<section xml:id="_upgrade_installed_packages">
<title>Upgrade Installed Packages</title>
<simpara>Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesn&#8217;t solve every problem you&#8217;ll encounter when upgrading software, it does enable you to maintain most system components with a few commands.</simpara>
<simpara>On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. It&#8217;s best to read /usr/ports/UPDATING before upgrading with portmaster.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<simpara>Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesnt solve every problem youll encounter when upgrading software, it does enable you to maintain most system components with a few commands.</simpara>
<simpara>On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. Its best to read /usr/ports/UPDATING before upgrading with portmaster.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
@ -232,29 +236,29 @@ resource.</simpara>
<entry align="center" valign="top"><simpara>Only upgrades installed packages, where possible.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get dist-upgrade</literal></simpara></entry>
<entry align="center" valign="top"><simpara>May add or remove packages to satisfy new dependencies.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum update</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf upgrade</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper update</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg upgrade</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
@ -262,7 +266,7 @@ resource.</simpara>
<entry align="center" valign="top"><simpara>Uses less to view update notes for ports (use arrow keys to scroll, pressq to quit).</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/ports-mgmt/portmaster &amp;&amp; make install &amp;&amp; portmaster -a</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs portmaster and uses it to update installed ports.</simpara></entry>
</row>
@ -277,11 +281,11 @@ resource.</simpara>
collections. These can be a good way to browse by category and discover
new software. Often, however, the quickest and most effective way to
locate a package is to search with command-line tools.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
@ -293,32 +297,32 @@ locate a package is to search with command-line tools.</simpara>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-cache search</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum search</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>yum search all</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches all fields, including description.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf search</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dnf search all</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches all fields, including description.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper se</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
@ -326,12 +330,12 @@ locate a package is to search with command-line tools.</simpara>
<entry align="center" valign="top"><simpara>Searches by name.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg search -f</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches by name, returning full descriptions.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg search -D</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches description.</simpara></entry>
</row>
@ -341,7 +345,7 @@ locate a package is to search with command-line tools.</simpara>
<entry align="center" valign="top"><simpara>Searches by name.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports &amp;&amp; make search key=</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches comments, descriptions, and dependencies.</simpara></entry>
</row>
@ -351,12 +355,12 @@ locate a package is to search with command-line tools.</simpara>
</section>
<section xml:id="_view_info_about_a_specific_package">
<title>View Info About a Specific Package</title>
<simpara>When deciding what to install, it&#8217;s often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the package&#8217;s dependencies.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<simpara>When deciding what to install, its often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the packages dependencies.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
@ -371,27 +375,27 @@ locate a package is to search with command-line tools.</simpara>
<entry align="center" valign="top"><simpara>Shows locally-cached info about a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dpkg -s package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Shows the current installed status of a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum info package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>yum deplist package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Lists dependencies for a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf info package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dnf repoquery -\/-requires package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Lists dependencies for a package.</simpara></entry>
</row>
@ -408,7 +412,7 @@ locate a package is to search with command-line tools.</simpara>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/category/port &amp;&amp; cat pkg-descr</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
</tbody>
</tgroup>
@ -417,11 +421,11 @@ locate a package is to search with command-line tools.</simpara>
<section xml:id="_install_a_package_from_repositories">
<title>Install a Package from Repositories</title>
<simpara>Once you know the name of a package, you can usually install it and its dependencies with a single command. In general, you can supply multiple packages to install simply by listing them all.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
@ -433,60 +437,60 @@ locate a package is to search with command-line tools.</simpara>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-get install package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where apt would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum install package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>yum install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>yum install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where yum would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf install package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dnf install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dnf install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where dnf would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper install</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg install package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
@ -501,14 +505,14 @@ locate a package is to search with command-line tools.</simpara>
</section>
<section xml:id="_install_a_package_from_the_local_filesystem">
<title>Install a Package from the Local Filesystem</title>
<simpara>Sometimes, even though software isn&#8217;t officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or viacurl on the command line. Once a package is on the target system, it can often be installed with a single command.</simpara>
<simpara>Sometimes, even though software isnt officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or viacurl on the command line. Once a package is on the target system, it can often be installed with a single command.</simpara>
<simpara>On Debian-derived systems, dpkg handles individual package files. If a package has unmet dependencies, gdebi can often be used to retrieve them from official repositories.</simpara>
<simpara>On CentOS and Fedora systems, yum and dnf are used to install individual files, and will also handle needed dependencies.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
@ -520,35 +524,35 @@ locate a package is to search with command-line tools.</simpara>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dpkg -i package.deb</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get install -yg debi &amp;&amp; gdebi package.deb</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs and uses gdebi to install package.deb and retrieve any missing dependencies.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg add package.txz</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg add -f package.txz</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs package even if already installed.</simpara></entry>
</row>
@ -559,11 +563,11 @@ locate a package is to search with command-line tools.</simpara>
<section xml:id="_remove_one_or_more_installed_packages">
<title>Remove One or More Installed Packages</title>
<simpara>Since a package manager knows what files are provided by a given package, it can usually remove them cleanly from a system if the software is no longer needed.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33.3333*"/>
<colspec colname="col_2" colwidth="33.3333*"/>
<colspec colname="col_3" colwidth="33.3334*"/>
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
@ -578,27 +582,27 @@ locate a package is to search with command-line tools.</simpara>
<entry align="center" valign="top"><simpara>yum remove package</simpara></entry>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get autoremove</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Removes unneeded packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum remove package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf erase package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg delete package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg autoremove</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Removes unneeded packages.</simpara></entry>
</row>
@ -610,10 +614,10 @@ locate a package is to search with command-line tools.</simpara>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg delete package</literal></simpara></entry>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"></entry>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/path_to_port &amp;&amp; make deinstall</literal></simpara></entry>
<entry align="center" valign="top"><simpara>De-installs an installed port.</simpara></entry>
</row>
@ -634,25 +638,24 @@ complex topic. For greater detail on a given system, you can consult the
following resources:</simpara>
<orderedlist numeration="arabic">
<listitem>
<simpara><link xl:href="https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials">This
guide</link> covers Ubuntu and Debian package management in detail.</simpara>
<simpara>This <link xlink:href="https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials">guide</link> covers Ubuntu and Debian package management in detail.</simpara>
</listitem>
<listitem>
<simpara>There&#8217;s an <link xl:href="https://www.centos.org/docs/5/html/yum/">official CentOS guide to managing software with yum</link>.</simpara>
<simpara>Theres an <link xlink:href="https://www.centos.org/docs/5/html/yum/">official CentOS guide to managing software with yum</link>.</simpara>
</listitem>
<listitem>
<simpara>There&#8217;s a <link xl:href="https://fedoraproject.org/wiki/Dnf">Fedora wiki page about dnf</link>, and an <link xl:href="https://dnf.readthedocs.org/en/latest/index.html">official manual for dnf itself</link></simpara>
<simpara>Theres a <link xlink:href="https://fedoraproject.org/wiki/Dnf">Fedora wiki page about dnf</link>, and an <link xlink:href="https://dnf.readthedocs.org/en/latest/index.html">official manual for dnf itself</link></simpara>
</listitem>
<listitem>
<simpara><link xl:href="https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg">This guide</link> covers FreeBSD package management using pkg.</simpara>
<simpara><link xlink:href="https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg">This guide</link> covers FreeBSD package management using pkg.</simpara>
</listitem>
<listitem>
<simpara>The <link xl:href="https://www.freebsd.org/doc/handbook/">FreeBSD Handbook</link> contains
a <link xl:href="https://www.freebsd.org/doc/handbook/ports-using.html">section on using
<simpara>The <link xlink:href="https://www.freebsd.org/doc/handbook/">FreeBSD Handbook</link> contains
a <link xlink:href="https://www.freebsd.org/doc/handbook/ports-using.html">section on using
the Ports Collection</link>.</simpara>
</listitem>
<listitem>
<simpara><link xl:href="http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.sw_cl.html">OpenSuSE documentation for Zypper</link> and <link xl:href="http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.onlineupdate.you.html">YaST</link>.</simpara>
<simpara><link xlink:href="http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.sw_cl.html">OpenSuSE documentation for Zypper</link> and <link xlink:href="http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.onlineupdate.you.html">YaST</link>.</simpara>
</listitem>
</orderedlist>
</section>

View File

@ -18,6 +18,7 @@ The original version of this guide can be found at https://www.digitalocean.com/
|=============================================================================
|15.1.2016 |v1.0 Converted and edited for TLDP |Jason Evans
|15.2.2016 |v1.1 Changed format to asciidoc and made corrections |Jason Evans
|30.3.2016 |v1.2 Added documentation for SuSE, Abstract section, and expanded overview, also many small typographical changes and corrections.| Jason Evans
|=============================================================================
==== Contributions
@ -107,11 +108,11 @@ While their functionality and benefits are broadly similar, packaging formats an
|FreeBSD |Ports, .txz |make, pkg
|===========================================
In Debian and systems based on it, like Ubuntu, Linux Mint, and Raspbian, the package format is the .debfile. APT, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.
In Debian and systems based on it such as Ubuntu, Linux Mint, and Raspbian, the package format is the .deb file. Apt, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.
Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been supplanted by dnf, a modernized fork which retains most of yum's interface.
Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been replaced by dnf, a modernized fork which retains most of yum's functionality.
SuSE also uses RPM files. However, the package management software is known as zypper. Zypper's command line interface is very similar to yum and YasT can be access from a graphical mode or from the command line.
SuSE also uses RPM files. However, the package management software is known as zypper. Zypper's command line interface is very similar to yum. SuSE also has a build-in gui called YasT that can handle package management and can be accessed from a graphical mode or from the command line.
FreeBSD's binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. It's usually much more convenient to use pkg, but occasionally a pre-compiled package is unavailable, or syou may need to change compile-time options.
@ -268,8 +269,7 @@ cross-referenced between systems, but only scratches the surface of a
complex topic. For greater detail on a given system, you can consult the
following resources:
1. https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials[This
guide] covers Ubuntu and Debian package management in detail.
1. This https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials[guide] covers Ubuntu and Debian package management in detail.
2. There's an https://www.centos.org/docs/5/html/yum/[official CentOS guide to managing software with yum].
3. There's a https://fedoraproject.org/wiki/Dnf[Fedora wiki page about dnf], and an https://dnf.readthedocs.org/en/latest/index.html[official manual for dnf itself]
4. https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg[This guide] covers FreeBSD package management using pkg.

View File

@ -0,0 +1,662 @@
<?xml version="1.0" encoding="UTF-8"?><?asciidoc-toc?>
<?asciidoc-numbered?>
<article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<info>
<title>Package Management Basics</title>
<subtitle>apt, yum, dnf, zypper, and pkg</subtitle>
<date>2016-03-30</date>
</info>
<section xml:id="_abstract">
<title>Abstract</title>
<simpara>This guide is intended as a quick reference for the fundamentals of finding, installing, and upgrading packages on a variety of distributions, and should help you translate that knowledge between systems.</simpara>
</section>
<section xml:id="_audience">
<title>Audience</title>
<simpara>For those new to Linux who need a basic understanding of package management.</simpara>
</section>
<section xml:id="_original_version_of_this_doc">
<title>Original version of this doc</title>
<simpara>The original version of this guide can be found at <link xlink:href="https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg">Digital Ocean</link>.</simpara>
</section>
<section xml:id="_revision_history">
<title>Revision History</title>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<tbody>
<row>
<entry align="center" valign="top"><simpara>15.1.2016</simpara></entry>
<entry align="center" valign="top"><simpara>v1.0 Converted and edited for TLDP</simpara></entry>
<entry align="center" valign="top"><simpara>Jason Evans</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>15.2.2016</simpara></entry>
<entry align="center" valign="top"><simpara>v1.1 Changed format to asciidoc and made corrections</simpara></entry>
<entry align="center" valign="top"><simpara>Jason Evans</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>30.3.2016</simpara></entry>
<entry align="center" valign="top"><simpara>v1.2 Added documentation for SuSE, Abstract section, and expanded overview, also many small typographical changes and corrections.</simpara></entry>
<entry align="center" valign="top"><simpara>Jason Evans</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section xml:id="_contributions">
<title>Contributions</title>
<itemizedlist>
<listitem>
<simpara><link xlink:href="https://www.digitalocean.com/community/users/bpb">Brennen Bearnes</link>
(original author).</simpara>
</listitem>
<listitem>
<simpara><link xlink:href="http://wiki.tldp.org/Jason%20Evans">Jason Evans</link> (editor and maintainer for TLDP)</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="_feedback">
<title>Feedback</title>
<simpara>Missing information, missing links, missing characters? Mail it to the maintainer of this document: jsevans <emphasis>at</emphasis> youvegotthe.info</simpara>
</section>
<section xml:id="_copyright_information">
<title>Copyright information</title>
<simpara>This work is licensed under a <link xlink:href="https://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</link>.</simpara>
</section>
<section xml:id="_introduction">
<title>Introduction</title>
<section xml:id="_why_was_this_document_written">
<title>Why was this document written?</title>
<simpara>Most modern Unix-like operating systems offer a centralized mechanism for finding and installing software. Software is usually distributed in the form of packages, kept in repositories. Working with packages is known as package management. Packages provide the basic components of an operating system, along with shared libraries, applications, services, and documentation.</simpara>
<simpara>A package management system does much more than one-time installation of software. It also provides tools for upgrading already-installed packages. Package repositories help to ensure that code has been vetted for use on your system, and that the installed versions of software have been approved by developers and package maintainers.</simpara>
<simpara>When configuring servers or development environments, its often necessary look beyond official repositories. Packages in the stable release of a distribution may be out of date, especially where new or rapidly-changing software is concerned. Nevertheless, package management is a vital skill for system administrators and developers, and the wealth of packaged software for major distributions is a tremendous
resource.</simpara>
</section>
<section xml:id="_what_do_you_need">
<title>What do you need?</title>
<simpara>This guide covers Debian, Ubuntu, CentOS, Fedora, SuSE, and FreeBSD and will require one of those distributions to be installed.</simpara>
<note>
<simpara>All of the commands in this guide assume that the user is running the commands as root or with <literal>sudo</literal>.</simpara>
</note>
</section>
<section xml:id="_package_management_systems_a_brief_overview">
<title>Package Management Systems: A Brief Overview</title>
<simpara>In a Windows environment, programs are packaged in .exe or .msi installers which will then install most of the files needed to run the program. If your computer doesnt have some dependant applications, then the program that you are trying to run will either not install or not run properly. You will then have to scour the internet in order to find the missing required applications or libraries. For example in CentOS 7, in order to install the VIM text editor, I need to add the following packages:</simpara>
<literallayout class="monospaced"> gpm-libs x86_64 1.20.7-5.el7 base 32 k
groff-base x86_64 1.22.2-8.el7 base 942 k
perl x86_64 4:5.16.3-286.el7 base 8.0 M
perl-Carp noarch 1.26-244.el7 base 19 k
perl-Encode x86_64 2.51-7.el7 base 1.5 M
perl-Exporter noarch 5.68-3.el7 base 28 k
perl-File-Path noarch 2.09-2.el7 base 26 k
perl-File-Temp noarch 0.23.01-3.el7 base 56 k
perl-Filter x86_64 1.49-3.el7 base 76 k
perl-Getopt-Long noarch 2.40-2.el7 base 56 k
perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k
perl-PathTools x86_64 3.40-5.el7 base 82 k
perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k
perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k
perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k
perl-Pod-Usage noarch 1.63-3.el7 base 27 k
perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k
perl-Socket x86_64 2.010-3.el7 base 49 k
perl-Storable x86_64 2.45-3.el7 base 77 k
perl-Text-ParseWords noarch 3.29-4.el7 base 14 k
perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k
perl-Time-Local noarch 1.2300-2.el7 base 24 k
perl-constant noarch 1.27-2.el7 base 19 k
perl-libs x86_64 4:5.16.3-286.el7 base 687 k
perl-macros x86_64 4:5.16.3-286.el7 base 43 k
perl-parent noarch 1:0.225-244.el7 base 12 k
perl-podlators noarch 2.5.1-3.el7 base 112 k
perl-threads x86_64 1.87-4.el7 base 49 k
perl-threads-shared x86_64 1.43-6.el7 base 39 k
vim-common x86_64 2:7.4.160-1.el7 base 5.9 M
vim-filesystem x86_64 2:7.4.160-1.el7 base 9.6 k
which x86_64 2.20-7.el7 base 41 k</literallayout>
<simpara>Imagine trying to manually install all of these programs one at a time just to be able to install a text editor! In the early days of Linux, we faced these kinds of problems, however this problem is fixed with package management systems such as apt, yum, and others. Package managers simplify everything. They look at the package that you want to install such as VIM, LibreOffice, etc., then look at what other package it depends upon, the dependencies of those packages, and so on; then it downloads them all and installs them. For example, in order to install VIM in CentOS 7 today, I simply have to run <literal>yum install vim</literal>.</simpara>
<section xml:id="_some_different_package_management_systems">
<title>Some different package management systems:</title>
<simpara>While their functionality and benefits are broadly similar, packaging formats and tools vary by platform:</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">Operating System</entry>
<entry align="left" valign="top">Format</entry>
<entry align="center" valign="top">Tool(s)</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top"><simpara>Debian</simpara></entry>
<entry align="left" valign="top"><simpara>.deb</simpara></entry>
<entry align="center" valign="top"><simpara>apt, apt-cache, apt-get, dpkg</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara>.deb</simpara></entry>
<entry align="center" valign="top"><simpara>apt, apt-cache, apt-get, dpkg</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara>.rpm</simpara></entry>
<entry align="center" valign="top"><simpara>yum</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara>.rpm</simpara></entry>
<entry align="center" valign="top"><simpara>dnf</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara>.rpm</simpara></entry>
<entry align="center" valign="top"><simpara>zypper</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD</simpara></entry>
<entry align="left" valign="top"><simpara>Ports, .txz</simpara></entry>
<entry align="center" valign="top"><simpara>make, pkg</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<simpara>In Debian and systems based on it such as Ubuntu, Linux Mint, and Raspbian, the package format is the .deb file. Apt, the Advanced Packaging Tool, provides commands used for most common operations: Searching repositories, installing collections of packages and their dependencies, and managing upgrades. APT commands operate as a front-end to the lower-level dpkg utility, which handles the installation of individual .deb files on the local system, and is sometimes invoked directly.</simpara>
<simpara>Fedora and enterprise level distributions like Red Hat Enterprise Linux (RHEL), CentOS, and Oracle Linux use RPM files. In CentOS, Oracle, and RHEL, yum is used to interact with both individual package files and repositories. In recent versions of Fedora, yum has been replaced by dnf, a modernized fork which retains most of yums functionality.</simpara>
<simpara>SuSE also uses RPM files. However, the package management software is known as zypper. Zyppers command line interface is very similar to yum. SuSE also has a build-in gui called YasT that can handle package management and can be accessed from a graphical mode or from the command line.</simpara>
<simpara>FreeBSDs binary package system is administered with the pkg command. FreeBSD also offers the Ports Collection, a local directory structure and tools which allow the user to fetch, compile, and install packages directly from source using Makefiles. Its usually much more convenient to use pkg, but occasionally a pre-compiled package is unavailable, or syou may need to change compile-time options.</simpara>
</section>
<section xml:id="_update_package_lists">
<title>Update Package Lists</title>
<simpara>Most systems keep a local database of the packages available from remote repositories. Its best to update this database before installing or upgrading packages. As a partial exception to this pattern, yum and dnf will check for updates before performing some operations, but you can ask them at any time whether updates are available.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="2">
<colspec colname="col_1" colwidth="50*"/>
<colspec colname="col_2" colwidth="50*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
<entry align="center" valign="top">Command</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="center" valign="top"><simpara><literal>apt-get update</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="center" valign="top"><simpara><literal>yum check-update</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="center" valign="top"><simpara><literal>dnf check-update</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="center" valign="top"><simpara><literal>zypper refresh</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="center" valign="top"><simpara><literal>pkg update</literal></simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="center" valign="top"><simpara><literal>portsnap fetch update</literal></simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section xml:id="_upgrade_installed_packages">
<title>Upgrade Installed Packages</title>
<simpara>Making sure that all of the installed software on a machine stays up to date would be an enormous undertaking without a package system. You would have to track upstream changes and security alerts for hundreds of different packages. While a package manager doesnt solve every problem youll encounter when upgrading software, it does enable you to maintain most system components with a few commands.</simpara>
<simpara>On FreeBSD, upgrading installed ports can introduce breaking changes or require manual configuration steps. Its best to read /usr/ports/UPDATING before upgrading with portmaster.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-get upgrade</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Only upgrades installed packages, where possible.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get dist-upgrade</literal></simpara></entry>
<entry align="center" valign="top"><simpara>May add or remove packages to satisfy new dependencies.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum update</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf upgrade</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper update</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg upgrade</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>less /usr/ports/UPDATING</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Uses less to view update notes for ports (use arrow keys to scroll, pressq to quit).</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/ports-mgmt/portmaster &amp;&amp; make install &amp;&amp; portmaster -a</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs portmaster and uses it to update installed ports.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
</section>
<section xml:id="_find_a_package">
<title>Find a Package</title>
<simpara>Most distributions offer a graphical or menu-driven front end to package
collections. These can be a good way to browse by category and discover
new software. Often, however, the quickest and most effective way to
locate a package is to search with command-line tools.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-cache search</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum search</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>yum search all</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches all fields, including description.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf search</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dnf search all</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches all fields, including description.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper se</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg search</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches by name.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg search -f</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches by name, returning full descriptions.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg search -D</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches description.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports &amp;&amp; make search name=package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches by name.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports &amp;&amp; make search key=</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Searches comments, descriptions, and dependencies.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section xml:id="_view_info_about_a_specific_package">
<title>View Info About a Specific Package</title>
<simpara>When deciding what to install, its often helpful to read detailed descriptions of packages. Along with human-readable text, these often include metadata like version numbers and a list of the packages dependencies.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-cache show package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Shows locally-cached info about a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dpkg -s package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Shows the current installed status of a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum info package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>yum deplist package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Lists dependencies for a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf info package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dnf repoquery -\/-requires package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Lists dependencies for a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper info search string</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Lists dependencies for a package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg info package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Shows info for an installed package.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/category/port &amp;&amp; cat pkg-descr</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section xml:id="_install_a_package_from_repositories">
<title>Install a Package from Repositories</title>
<simpara>Once you know the name of a package, you can usually install it and its dependencies with a single command. In general, you can supply multiple packages to install simply by listing them all.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-get install package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where apt would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum install package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>yum install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>yum install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where yum would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf install package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dnf install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>dnf install -y package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Assumes "yes" where dnf would usually prompt to continue.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper install</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg install package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg install package1 package2</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs all listed packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/category/port &amp;&amp; make install</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Builds and installs a port from source.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section xml:id="_install_a_package_from_the_local_filesystem">
<title>Install a Package from the Local Filesystem</title>
<simpara>Sometimes, even though software isnt officially packaged for a given operating system, a developer or vendor will offer package files for download. You can usually retrieve these with your web browser, or viacurl on the command line. Once a package is on the target system, it can often be installed with a single command.</simpara>
<simpara>On Debian-derived systems, dpkg handles individual package files. If a package has unmet dependencies, gdebi can often be used to retrieve them from official repositories.</simpara>
<simpara>On CentOS and Fedora systems, yum and dnf are used to install individual files, and will also handle needed dependencies.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dpkg -i package.deb</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get install -yg debi &amp;&amp; gdebi package.deb</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs and uses gdebi to install package.deb and retrieve any missing dependencies.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper install package.rpm</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg add package.txz</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg add -f package.txz</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Installs package even if already installed.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section xml:id="_remove_one_or_more_installed_packages">
<title>Remove One or More Installed Packages</title>
<simpara>Since a package manager knows what files are provided by a given package, it can usually remove them cleanly from a system if the software is no longer needed.</simpara>
<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="3">
<colspec colname="col_1" colwidth="33*"/>
<colspec colname="col_2" colwidth="33*"/>
<colspec colname="col_3" colwidth="33*"/>
<thead>
<row>
<entry align="center" valign="top">System</entry>
<entry align="left" valign="top">Command</entry>
<entry align="center" valign="top">Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="top"><simpara>Debian / Ubuntu</simpara></entry>
<entry align="left" valign="top"><simpara><literal>apt-get remove package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>yum remove package</simpara></entry>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>apt-get autoremove</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Removes unneeded packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>CentOS</simpara></entry>
<entry align="left" valign="top"><simpara><literal>yum remove package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>Fedora</simpara></entry>
<entry align="left" valign="top"><simpara><literal>dnf erase package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Packages</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg delete package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>pkg autoremove</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Removes unneeded packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>SuSE</simpara></entry>
<entry align="left" valign="top"><simpara><literal>zypper rm package</literal></simpara></entry>
<entry align="center" valign="top"><simpara>Removes unneeded packages.</simpara></entry>
</row>
<row>
<entry align="center" valign="top"><simpara>FreeBSD Ports</simpara></entry>
<entry align="left" valign="top"><simpara><literal>pkg delete package</literal></simpara></entry>
<entry align="center" valign="top"/>
</row>
<row>
<entry align="center" valign="top"/>
<entry align="left" valign="top"><simpara><literal>cd /usr/ports/path_to_port &amp;&amp; make deinstall</literal></simpara></entry>
<entry align="center" valign="top"><simpara>De-installs an installed port.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section xml:id="_get_help">
<title>Get Help</title>
<simpara>In addition to web-based documentation, keep in mind that Unix manual pages (usually referred to as man pages) are available for most commands from the shell. To read a page, use the <literal>man</literal> command. For example, <literal>man yum</literal> will give you a brief manual on how to use yum.</simpara>
</section>
</section>
<section xml:id="_conclusion_and_further_reading">
<title>Conclusion and Further Reading</title>
<simpara>This guide provides an overview of basic operations that can be
cross-referenced between systems, but only scratches the surface of a
complex topic. For greater detail on a given system, you can consult the
following resources:</simpara>
<orderedlist numeration="arabic">
<listitem>
<simpara>This <link xlink:href="https://www.digitalocean.com/community/tutorials/ubuntu-and-debian-package-management-essentials">guide</link> covers Ubuntu and Debian package management in detail.</simpara>
</listitem>
<listitem>
<simpara>Theres an <link xlink:href="https://www.centos.org/docs/5/html/yum/">official CentOS guide to managing software with yum</link>.</simpara>
</listitem>
<listitem>
<simpara>Theres a <link xlink:href="https://fedoraproject.org/wiki/Dnf">Fedora wiki page about dnf</link>, and an <link xlink:href="https://dnf.readthedocs.org/en/latest/index.html">official manual for dnf itself</link></simpara>
</listitem>
<listitem>
<simpara><link xlink:href="https://www.digitalocean.com/community/tutorials/how-to-manage-packages-on-freebsd-10-1-with-pkg">This guide</link> covers FreeBSD package management using pkg.</simpara>
</listitem>
<listitem>
<simpara>The <link xlink:href="https://www.freebsd.org/doc/handbook/">FreeBSD Handbook</link> contains
a <link xlink:href="https://www.freebsd.org/doc/handbook/ports-using.html">section on using
the Ports Collection</link>.</simpara>
</listitem>
<listitem>
<simpara><link xlink:href="http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.sw_cl.html">OpenSuSE documentation for Zypper</link> and <link xlink:href="http://doc.opensuse.org/documentation/html/openSUSE_114/opensuse-reference/cha.onlineupdate.you.html">YaST</link>.</simpara>
</listitem>
</orderedlist>
</section>
</article>