Pacman: Difference between revisions

From Leo's Notes
This page was last edited on 1 October 2019, at 20:42.
m Text replacement - "{{Navbox Linux}}{{Navbox Linux}}" to "{{Navbox Linux}}"
Usage in table form
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Pacman is the package manager for arch linux.
Pacman is the package manager for Arch Linux.


== Introduction ==
== Usage ==
 
Configuration files are stored in {{code|/etc/pacman}}
Configuration files are stored in /etc/pacman
=== Updating Databases ===
 
Similar to a {{code|yum clean all ; yum update}} you can update the repository information by running:
pacman -Syy
 
=== Searching ===
Search for a package
pacman -Ss packageName
 
=== Installing ===
pacman -S packageName groupName
 
=== Updating System ===
pacman -Syu
 
=== Removing a Package ===
pacman -R packageName


{| class="wikitable"
! Task
! Command
|-
| Update repository metadata
| {{highlight|lang=terminal|code=
# pacman -Syy
}}
|-
| Install a package by name
| {{highlight|lang=terminal|code=
# pacman -S packageName groupName
}}
|-
| Remove a package by name
| {{highlight|lang=terminal|code=
# pacman -R packageName
}}
With dependencies
With dependencies
pacman -Rsc packageName
{{highlight|lang=terminal|code=
 
# pacman -Rsc packageName
 
}}
=== Searching for whatprovides ===
|-
Install the pkgfile utilitiy
| System-wide upgrade
pacman -S pkgfile
| {{highlight|lang=terminal|code=
 
# pacman -Syu
}}
|-
| Upgrade a package
| {{highlight|lang=terminal|code=
# pacman -Syyu packageName
}}
|-
| Search for a package
| {{highlight|lang=terminal|code=
# pacman -Ss packageName
}}
|-
| List installed packages
| {{highlight|lang=terminal|code=
# dpkg -l
}}
|-
| Determine which package provided a file
| {{highlight|lang=terminal|code=
# pacman -Qo <path to file>
}}
|-
| Determine what package provides a file
| Install the pkgfile utility
{{highlight|lang=terminal|code=
# pacman -S pkgfile
}}
Update the repo:
Update the repo:
pkgfile --update
{{highlight|lang=terminal|code=
 
# pkgfile --update
}}
Then to search:
Then to search:
pkgfile -s lspci
{{highlight|lang=terminal|code=
core/pciutils
# pkgfile -s lspci
 
core/pciutils
=== Searching Package Ownership ===
}}
When given a path (eg. /usr/bin/startx), you can find which package provided the file by using:
|}


pacman -Qo /usr/bin/startx


This is similar to RPM's {{code|rpm -qf /usr/bin/startx}}.


[[Category:Linux]]{{Navbox Linux}}
{{Navbox Linux}}[[Category:Linux]]
[[Category:PackageManagement]]
[[Category:PackageManagement]]

Latest revision as of 20:42, 1 October 2019

Pacman is the package manager for Arch Linux.

Usage

Configuration files are stored in /etc/pacman

Task Command
Update repository metadata
# pacman -Syy
Install a package by name
# pacman -S packageName groupName
Remove a package by name
# pacman -R packageName

With dependencies

# pacman -Rsc packageName
System-wide upgrade
# pacman -Syu
Upgrade a package
# pacman -Syyu packageName
Search for a package
# pacman -Ss packageName
List installed packages
# dpkg -l
Determine which package provided a file
# pacman -Qo <path to file>
Determine what package provides a file Install the pkgfile utility
# pacman -S pkgfile

Update the repo:

# pkgfile --update

Then to search:

# pkgfile -s lspci
core/pciutils