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
 
(10 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
Similar to a <code>yum clean all ; yum update</code> you can update the repository information by running:
|-
pacman -Syy
| Update repository metadata
 
| {{highlight|lang=terminal|code=
=== Searching ===
# pacman -Syy
Search for a package
}}
pacman -Ss packageName
|-
 
| Install a package by name
=== Installing ===
| {{highlight|lang=terminal|code=
pacman -S packageName groupName
# 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
}}
|}


=== Updating System ===
pacman -Syu


=== Removing a Package ===
pacman -R packageName
With dependencies
pacman -Rsc packageName


[[Category:Linux]]
{{Navbox Linux}}[[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