|
|
(14 intermediate revisions by the same user not shown) |
Line 48: |
Line 48: |
| </blockquote><!-- Notes --> | | </blockquote><!-- Notes --> |
|
| |
|
| = Usage = | | = Pacman Tools = |
| <blockquote> | | <blockquote> |
| Pacman is arch's primary binary package manager. This is typically what you
| | == Misc == |
| would use for installing/removing software. Pacman comes installed.
| |
| | |
| installing packages
| |
| <source lang="bash">
| |
| pacman -Ss <pkg> # search
| |
| pacman -Qo /bin/netstat # search package containing this file
| |
| | |
| pacman -S <pkg> # install
| |
| pacman -Rs <pkg> # uninstall with dependencies
| |
| pacman -Rsc <pkg> # uninstall with dependencies, and packages that require this package
| |
| pacman -Rsd --nodeps <pkg> # uninstall, allowing broken deps (useful for removing video driver)
| |
| </source>
| |
| | |
| updates
| |
| <source lang="bash">
| |
| pacman -Syy # refresh package index
| |
| pacman -Syu # update all
| |
| </source>
| |
| | |
| maintenance
| |
| <source lang="bash">
| |
| pacman -Si <pkg> # info
| |
| pacman -Q # list of all installed packages
| |
| pacman -Rns $(pacman -Qtdq) # remove unneeded packages
| |
| pacman -Sc # remove old packages from pkg-cache (MAKE SURE CLEANMETHOD=KEEPCURRENT IN /ETC/PACMAN.CONF)
| |
| </source>
| |
| | |
| </blockquote><!-- usage -->
| |
| | |
| = Mirrorlist =
| |
| <blockquote>
| |
| You can automatically determine the fastest servers and sort them by quickest.<br>
| |
| I wrote a bashscript <code>pacman-mirrorlist</code> to do this for me.
| |
| <source lang="bash">
| |
| sudo pacman -S pacman-contrib
| |
| | |
| # generate mirrorlist for all CA/US mirrors
| |
| awk '/^## Canada$/{f=1; next}f==0{next}/^$/{exit}{print substr($0, 1);}' /etc/pacman.d/mirrorlist.pacnew | sed 's/^#//' | sudo tee /etc/pacman.d/mirrorlist.tmp
| |
| awk '/^## United States$/{f=1; next}f==0{next}/^$/{exit}{print substr($0, 1);}' /etc/pacman.d/mirrorlist.pacnew | sed 's/^#//' | sudo tee -a /etc/pacman.d/mirrorlist.tmp
| |
| | |
| rankmirrors -n 10 /etc/pacman.d/mirrorlist.tmp | sudo tee /etc/pacman.d/mirrorlist
| |
| </source>
| |
| </blockquote><!-- Mirrorlist -->
| |
| | |
| = Key Management =
| |
| <blockquote>
| |
| <source lang="bash">
| |
| pacman-key --init
| |
| pacman-key --populate archlinux
| |
| pacman-key --refresh-keys
| |
| </source>
| |
| </blockquote><!-- Key Management -->
| |
| | |
| = Tips/Tricks =
| |
| <blockquote>
| |
| == Holding/Pinning/Locking Packages ==
| |
| <blockquote>
| |
| Packages can be set to be ignored in <code>/etc/pacman.conf</code>.
| |
| | |
| <source lang="ini">
| |
| IgnorePkg = salt zfs-linux spl-linux
| |
| </source>
| |
| </blockquote><!-- pinning packages -->
| |
| | |
| == Downloading old Packages ==
| |
| <blockquote>
| |
| === Archlinux ===
| |
| <blockquote>
| |
| Find the package you'd like to downgrade to here <code>https://archive.archlinux.org/packages/</code>.
| |
| | |
| Ex:
| |
| <syntaxhighlight lang="bash">
| |
| firefox https://archive.archlinux.org/packages ## find url to package
| |
| | |
| pacman -U \
| |
| https://archive.archlinux.org/packages/l/linux/linux-4.15.3-2-x86_64.pkg.tar.xz \
| |
| https://archive.archlinux.org/packages/l/linux-headers-4.15.3-2-x86_64.pkg.tar.xz
| |
| </syntaxhighlight>
| |
| | |
| {{ WARNING |
| |
| Occasionally, you might need to install something to satisfy a current AUR package.
| |
| But installing the core package will break the existing AUR package dependencies.
| |
| | |
| You have 2x options:
| |
| | |
| <source lang="bash">
| |
| pacaur -S zfs-linux spl-linux -U https://... https://..
| |
| </source>
| |
| }}
| |
| </blockquote><!-- Archlinux -->
| |
| | |
| === Archlinux-Arm ===
| |
| <blockquote> | | <blockquote> |
| <source lang="bash"> | | {| |
| # find cpu arch
| | |- |
| uname -a
| | | [[pacman-contrib]] || user scripts for managing pacman repos |
| | |- |
| | |} |
| | </blockquote><!-- Misc --> |
|
| |
|
| # download package for your arch
| | == Local Caching == |
| http://tardis.tiny-vps.com/aarm/packages/f/firefox/firefox-79.0.1-aarch64.tar.xz
| |
| | |
| # install
| |
| pacman -U firefox-79.0.1-aarch64.tar.xz
| |
| </source>
| |
| </blockquote><!-- Archlinux-Arm -->
| |
| </blockquote><!-- Downloading old packages -->
| |
| </blockquote><!-- tips/tricks -->
| |
| | |
| = Troubleshooting = | |
| <blockquote> | | <blockquote> |
| == Load metadata for package error ==
| | {| |
| <blockquote>
| | |- |
| The pacman database is corrupt. Simply delete the package's file, and re-install using force.
| | | [[pacman pacredir]] || share pacman downloaded packages over local network |
| | | |- |
| <source lang="bash">
| | | [[pacman pacserve]] || share pacman downloaded packages over local network |
| sudo rm -rf /var/lib/pacman/local/man-pages-*
| | |- |
| sudo pacman -S --force man-pages
| | | [[pacman aurutils]] || scripts for working with aur, sharing over local network |
| </source>
| | |- |
| </blockquote><!-- load metadata for package --> | | |} |
| </blockquote><!-- troubleshooting --> | | </blockquote><!-- Local Caching --> |
| | </blockquote><!-- Pacman Tools --> |