Pacman: Difference between revisions

From Leo's Notes
This page was last edited on 1 October 2019, at 20:42.
No edit summary
Usage in table form
 
(11 intermediate revisions by 2 users 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
{| class="wikitable"
=== Updating Databases ===
! 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
{{highlight|lang=terminal|code=
# pacman -Rsc packageName
}}
|-
| System-wide upgrade
| {{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:
{{highlight|lang=terminal|code=
# pkgfile --update
}}
Then to search:
{{highlight|lang=terminal|code=
# pkgfile -s lspci
core/pciutils
}}
|}


Similar to a <code>yum clean all ; yum update</code> you can update the repository information by running:
pacman -Syy


=== Searching ===
Search for a package
pacman -Ss packageName


=== Installing ===
{{Navbox Linux}}[[Category:Linux]]
pacman -S packageName groupName
 
=== Updating System ===
pacman -Syu
 
 
[[Category:Linux]]
[[Category:PackageManagement]]
[[Category:PackageManagement]]
{{Navbox Linux}}

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