We are still actively working on the spam issue.

Difference between revisions of "Pacman"

From InstallGentoo Wiki
Jump to: navigation, search
m (category:software category:howto)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''Pacman''' is the package manager used by the [[Arch|Arch Linux]] distribution. It tracks all the software installed in the system and can automatically install, uninstall, upgrade or downgrade packages using a remote central repository or local <code>.pkg.tar.xz</code> files.
+
{{DISPLAYTITLE:pacman}}
 +
'''pacman''' is the package manager used by the [[Arch|Arch Linux]] distribution. It tracks all the software installed in the system and can automatically install, uninstall, upgrade or downgrade packages using a remote central repository or local {{ic|.pkg.tar.xz}} files.
  
 
== Usage ==
 
== Usage ==
  
Pacman is very simple to use. It should be noted, however, that all examples found in this page are to be run as root.
+
pacman is very simple to use.
  
=== Installing ===
+
{{bc|# pacman -S ''package1'' ''package2'' ''...''}}
 
 
To install a package or a group of packages, simply supply its name as argument to the <code>-S</code> option:
 
 
 
<pre>pacman -S <package or group></pre>
 
  
 
=== Uninstalling ===
 
=== Uninstalling ===
  
To uninstall a package or group of packages, simply pass its name as argument to the <code>-R</code> option:
+
To uninstall a package or group of packages, simply pass its name as argument to the {{ic|-R}} option:
  
<pre>pacman -R <package or group></pre>
+
{{bc|# pacman -R ''package or group''}}
  
 
=== System upgrade ===
 
=== System upgrade ===
Line 21: Line 18:
 
To upgrade the whole system, issue the following command:
 
To upgrade the whole system, issue the following command:
  
<pre>pacman -Syu</pre>
+
{{bc|# pacman -Syu}}
  
 
Partial upgrades are not supported in Arch Linux. Always upgrade the whole system at once and bring it to the latest version, otherwise incompatibilities could occur.
 
Partial upgrades are not supported in Arch Linux. Always upgrade the whole system at once and bring it to the latest version, otherwise incompatibilities could occur.
Line 27: Line 24:
 
=== Package databases ===
 
=== Package databases ===
  
You can query the package database of the remote repositories or the local database of installed packages using the <code>-S</code> or the <code>-Q</code> options respectively. The lower-case suboptions determine which operation will be done.
+
You can query the package database of the remote repositories or the local database of installed packages using the {{ic|-S}} or the {{ic|-Q}} options respectively. The lower-case suboptions determine which operation will be done.
  
 
==== Searching for packages ====
 
==== Searching for packages ====
  
<pre>
+
For online repositories:
pacman -Ss <text>    # Searches the repository
+
 
pacman -Qs <text>    # Searches installed packages
+
{{bc|# pacman -Ss ''packages''}}
</pre>
+
 
 +
For local packages:
 +
 
 +
{{bc|# pacman -Qs ''packages''}}
  
 
Both the names and the descriptions of packages will be searched.
 
Both the names and the descriptions of packages will be searched.
Line 40: Line 40:
 
==== Obtaining information on a package ====
 
==== Obtaining information on a package ====
  
<pre>
+
For online repositories:
pacman -Si <package>    # Remote repository
+
 
pacman -Qi <package>    # Installed packages
+
{{bc|# pacman -Si ''package''}}
</pre>
+
 
 +
For local packages:
 +
 
 +
{{bc|# pacman -Qi ''package''}}
  
 
=== Files belonging to a package ===
 
=== Files belonging to a package ===
Line 49: Line 52:
 
To obtain a list of files that belong to an installed package:
 
To obtain a list of files that belong to an installed package:
  
<pre>pacman -Ql <package></pre>
+
{{bc|# pacman -Ql ''package''}}
  
 
=== Which package owns a file ===
 
=== Which package owns a file ===
Line 55: Line 58:
 
To find out which installed package owns any given file:
 
To find out which installed package owns any given file:
  
<pre>pacman -Qo /path/to/file</pre>
+
{{bc|# pacman -Qo ''/path/to/file''}}
  
 
=== Unneeded packages ===
 
=== Unneeded packages ===
Line 61: Line 64:
 
To list packages that were installed as dependencies and that are not needed anymore:
 
To list packages that were installed as dependencies and that are not needed anymore:
  
<pre>pacman -Qdt</pre>
+
{{bc|# pacman -Qdt}}
  
 
[[Category:GNU/Linux]]
 
[[Category:GNU/Linux]]
 +
[[Category:Arch]]
 +
[[Category:Package manager]]
 +
[[Category:Software]]
 +
[[Category:HowTo]]

Latest revision as of 14:58, 24 February 2016

pacman is the package manager used by the Arch Linux distribution. It tracks all the software installed in the system and can automatically install, uninstall, upgrade or downgrade packages using a remote central repository or local .pkg.tar.xz files.

Usage

pacman is very simple to use.

# pacman -S package1 package2 ...

Uninstalling

To uninstall a package or group of packages, simply pass its name as argument to the -R option:

# pacman -R package or group

System upgrade

To upgrade the whole system, issue the following command:

# pacman -Syu

Partial upgrades are not supported in Arch Linux. Always upgrade the whole system at once and bring it to the latest version, otherwise incompatibilities could occur.

Package databases

You can query the package database of the remote repositories or the local database of installed packages using the -S or the -Q options respectively. The lower-case suboptions determine which operation will be done.

Searching for packages

For online repositories:

# pacman -Ss packages

For local packages:

# pacman -Qs packages

Both the names and the descriptions of packages will be searched.

Obtaining information on a package

For online repositories:

# pacman -Si package

For local packages:

# pacman -Qi package

Files belonging to a package

To obtain a list of files that belong to an installed package:

# pacman -Ql package

Which package owns a file

To find out which installed package owns any given file:

# pacman -Qo /path/to/file

Unneeded packages

To list packages that were installed as dependencies and that are not needed anymore:

# pacman -Qdt