ArchLinux:Packages: Difference between revisions

From Wiki³
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{TitleIcon|arch=true}} Managing Packages}}<metadesc>Tips and tricks for managing packages on Arch Linux.</metadesc>
{{DISPLAYTITLE:{{TitleIcon|arch=true}} Managing Packages}}<metadesc>Tips and tricks for managing packages on Arch Linux.</metadesc>
<div id="tocalign">__TOC__</div>
<div id="tocalign">__TOC__</div>
{{UnderConstruction}}
{{Back|Arch Linux}}
{{Back|Arch Linux}}
= {{Icon24|sitemap}} Introduction =
= {{Icon24|sitemap}} Introduction =
Line 8: Line 7:
The Arch [[archwiki:official repositories|official repositories]] according to the ArchWiki contain "essential and popular software" and are maintained by the package maintainers that are part of the core Arch team. The official repositories are made up of {{mono|core}}, {{mono|extra}}, {{mono|multilib}} and {{mono|testing}}. Typically a user is already familiar with the first two, the third if you are a gamer (it is used to install 32-bit versions of libraries); but {{mono|testing}} is usually new to a lot of users. The {{mono|testing}} repository is used for testing packages that are soon to be migrated into one of the other repositories (ie. currently in testing).
The Arch [[archwiki:official repositories|official repositories]] according to the ArchWiki contain "essential and popular software" and are maintained by the package maintainers that are part of the core Arch team. The official repositories are made up of {{mono|core}}, {{mono|extra}}, {{mono|multilib}} and {{mono|testing}}. Typically a user is already familiar with the first two, the third if you are a gamer (it is used to install 32-bit versions of libraries); but {{mono|testing}} is usually new to a lot of users. The {{mono|testing}} repository is used for testing packages that are soon to be migrated into one of the other repositories (ie. currently in testing).
== {{Icon|notebook}} Arch User Repositories (AUR) ==
== {{Icon|notebook}} Arch User Repositories (AUR) ==
The [[archwiki:AUR|AUR]] (or Arch User Repositories) simply put, contain everything else. The AUR is a community-driven repository where users can contribute packages and/or vote on package submissions to be moved into the {{mono|community}} repository. Normally access to packages in the AUR require the use of a 3rd party package utility or by building them manually, once moved into {{mono|community}} they can be directly accessed over {{mono|pacman}} or {{mono|abs}}.
The [[archwiki:AUR|AUR]] (or Arch User Repositories) simply put, contain everything else. The AUR is a community-driven repository where users can contribute packages and/or vote on package submissions to be moved into the {{mono|community}} repository. Normally access to packages in the AUR require the use of a 3rd party package utility or by building them manually, once moved into {{mono|community}} they can be directly accessed over {{mono|pacman}}.


Some utilities for managing packages from the AUR include: [[aur:cower]], [[aur:pacaur]], [[aur:packer]], [[aur:trizen]], [[aur:yaourt]]
Some utilities for managing packages from the AUR include: [[aur:cower]], [[aur:pacaur]], [[aur:packer]], [[aur:trizen]], [[aur:yaourt]]
{{Warning|Due to a security issue where files are sourced before giving the user a chance to interact, it is not recommeneded to use {{mono|packer}} or {{mono|yaourt}}.}}
{{Warning|Due to a security issue where files are sourced before giving the user a chance to interact, it is not recommeneded to use {{mono|packer}} or {{mono|yaourt}}.}}
I personally use {{mono|pacaur}} and would also recommend the same to anyone.
I personally use {{mono|pacaur}} and would also recommend the same to anyone.
== {{Icon|notebook}} AUR Helper Installation ==
== {{Icon|notebook}} AUR Helper Installation ==
To install [[aur:pacaur]] first manually install {{mono|cower}}.
To install [[aur:pacaur]] first manually install {{mono|cower}}.
Line 21: Line 21:
= {{Icon24|sitemap}} Cheat Sheet =
= {{Icon24|sitemap}} Cheat Sheet =
Given that {{mono|pacaur}} is a {{mono|pacman}} wrapper in addition to being an AUR helper, all syntax that is valid for {{mono|pacman}} is also valid for {{mono|pacaur}}.
Given that {{mono|pacaur}} is a {{mono|pacman}} wrapper in addition to being an AUR helper, all syntax that is valid for {{mono|pacman}} is also valid for {{mono|pacaur}}.
{{Console|1=pacaur -Qdt        {{BlackBold|# list all packages which are orphaned}}<br/>pacaur -Qo          {{BlackBold|# determine which package owns a given file}}<br/>pacaur -Ql          {{BlackBold|# list all files installed by a given package}}<br/>pacaur -R          {{BlackBold|# delete a single pacakage}}<br/>pacaur -Rs          {{BlackBold|# delete a single package and all unused dependencies}}<br/>pacaur -Sc          {{BlackBold|# delete all not currently installed package files}}<br/>pacaur -Scc        {{BlackBold|# delete all installed package files (not recommended)}}<br/>pacaur -Syu        {{BlackBold|# upgrade packages (synchronise before)}}<br/>pacaur -Syu --devel {{BlackBold|# upgrade packages including development ones.}}<br/>pacaur -Syyu        {{BlackBold|# force refresh and upgrade packages}}<br/>pacaur -S          {{BlackBold|# install package(s)}}<br/>pacaur -Sw          {{BlackBold|# downloads package(s) but does not install them}}<br/>pacaur -U          {{BlackBold|# install package from a file}}<br/>pacaur -Si          {{BlackBold|# show information about a package}}<br/>pacaur -Ss          {{BlackBold|# search for package(s)}}<br/>pacaur -Qs          {{BlackBold|# search for package(s) in the local database}}<br/>pacaur -Qi          {{BlackBold|# show information about a package in the local database}}<br/>pacaur -Fs          {{BlackBold|# show which package installed a certain file}}|prompt=false}}
{{Console|1=pacaur -Qdt        {{BlackBold|# list all packages which are orphaned}}<br/>pacaur -Qo          {{BlackBold|# determine which package owns a given file}}<br/>pacaur -Ql          {{BlackBold|# list all files installed by a given package}}<br/>pacaur -R          {{BlackBold|# delete a single pacakage}}<br/>pacaur -Rs          {{BlackBold|# delete a single package and all unused dependencies}}<br/>pacaur -Sc          {{BlackBold|# delete all not currently installed package files (not recommended)}}<br/>pacaur -Scc        {{BlackBold|# delete all installed package files (not recommended)}}<br/>paccache -dv        {{BlackBold|# keep last 3 of each package in cache, delete the rest (dry run)}}<br/>paccache -rv        {{BlackBold|# keep last 3 of each package in cache, delete the rest}}<br/>paccache -ruk0      {{BlackBold|# delete all packages in cache that aren't installed}}<br/>pacaur -Syu        {{BlackBold|# upgrade packages (synchronise before)}}<br/>pacaur -Syu --devel {{BlackBold|# upgrade packages including development ones.}}<br/>pacaur -Syyu        {{BlackBold|# force refresh and upgrade packages}}<br/>pacaur -S          {{BlackBold|# install package(s)}}<br/>pacaur -Sw          {{BlackBold|# downloads package(s) but does not install them}}<br/>pacaur -U          {{BlackBold|# install package from a file}}<br/>pacaur -Si          {{BlackBold|# show information about a package}}<br/>pacaur -Ss          {{BlackBold|# search for package(s)}}<br/>pacaur -Qs          {{BlackBold|# search for package(s) in the local database}}<br/>pacaur -Qi          {{BlackBold|# show information about a package in the local database}}<br/>pacaur -Fy          {{BlackBold|# sync the file database}}<br/>pacaur -Fs          {{BlackBold|# show which package installed a certain file (requires: file database)}}|prompt=false}}
 
[[Category:Arch Linux]]
[[Category:Arch Linux]]

Latest revision as of 10:23, 8 August 2017

Icon Introduction

Managing packages on Arch Linux is honestly a joy to behold once it is fully understood. This is a collection of useful tips and tricks that I have picked up over the years using Arch.

Icon Official Repositories

The Arch official repositories according to the ArchWiki contain "essential and popular software" and are maintained by the package maintainers that are part of the core Arch team. The official repositories are made up of core, extra, multilib and testing. Typically a user is already familiar with the first two, the third if you are a gamer (it is used to install 32-bit versions of libraries); but testing is usually new to a lot of users. The testing repository is used for testing packages that are soon to be migrated into one of the other repositories (ie. currently in testing).

Icon Arch User Repositories (AUR)

The AUR (or Arch User Repositories) simply put, contain everything else. The AUR is a community-driven repository where users can contribute packages and/or vote on package submissions to be moved into the community repository. Normally access to packages in the AUR require the use of a 3rd party package utility or by building them manually, once moved into community they can be directly accessed over pacman.

Some utilities for managing packages from the AUR include: aur:cower, aur:pacaur, aur:packer, aur:trizen, aur:yaourt

IconWARNING: Due to a security issue where files are sourced before giving the user a chance to interact, it is not recommeneded to use packer or yaourt.

I personally use pacaur and would also recommend the same to anyone.

Icon AUR Helper Installation

To install aur:pacaur first manually install cower.

# git clone https://aur.archlinux.org/cower.git
# cd cower && makepkg -si && cd .. && rm -rf cower
IconIf makepkg complains about GPG keys see this pinned comment or use gpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53

Then proceed to install pacaur manually.

# git clone https://aur.archlinux.org/pacaur.git
# cd pacaur && makepkg -si && cd .. && rm -rf pacaur

Icon Cheat Sheet

Given that pacaur is a pacman wrapper in addition to being an AUR helper, all syntax that is valid for pacman is also valid for pacaur.

pacaur -Qdt # list all packages which are orphaned
pacaur -Qo # determine which package owns a given file
pacaur -Ql # list all files installed by a given package
pacaur -R # delete a single pacakage
pacaur -Rs # delete a single package and all unused dependencies
pacaur -Sc # delete all not currently installed package files (not recommended)
pacaur -Scc # delete all installed package files (not recommended)
paccache -dv # keep last 3 of each package in cache, delete the rest (dry run)
paccache -rv # keep last 3 of each package in cache, delete the rest
paccache -ruk0 # delete all packages in cache that aren't installed
pacaur -Syu # upgrade packages (synchronise before)
pacaur -Syu --devel # upgrade packages including development ones.
pacaur -Syyu # force refresh and upgrade packages
pacaur -S # install package(s)
pacaur -Sw # downloads package(s) but does not install them
pacaur -U # install package from a file
pacaur -Si # show information about a package
pacaur -Ss # search for package(s)
pacaur -Qs # search for package(s) in the local database
pacaur -Qi # show information about a package in the local database
pacaur -Fy # sync the file database
pacaur -Fs # show which package installed a certain file (requires: file database)