{"id":219,"date":"2019-09-10T21:03:34","date_gmt":"2019-09-10T13:03:34","guid":{"rendered":"https:\/\/freeapp.sbs\/blog\/?p=219"},"modified":"2025-04-01T17:05:58","modified_gmt":"2025-04-01T08:05:58","slug":"gw4nsx7d3lvzhqd","status":"publish","type":"post","link":"https:\/\/eternalsphere.net\/echoes\/index.php\/2019\/09\/10\/gw4nsx7d3lvzhqd\/","title":{"rendered":"pacman"},"content":{"rendered":"<p>Installing specific packages<\/p>\n<p># pacman -S package_name1 package_name2 &#8230;<\/p>\n<p>To install a list of packages with regex<\/p>\n<p># pacman -S $(pacman -Ssq package_regex)<\/p>\n<p>To install the version from the extra repository<\/p>\n<p># pacman -S extra\/package_name<\/p>\n<p>To install a number of packages sharing similar patterns in their names one can use curly brace expansion. For example:<\/p>\n<p># pacman -S plasma-{desktop,mediacenter,nm}<\/p>\n<p>This can be expanded to however many levels needed:<\/p>\n<p># pacman -S plasma-{workspace{,-wallpapers},pa}<\/p>\n<p>Installing package groups<\/p>\n<p># pacman -S gnome<\/p>\n<p>To see what packages belong to the gnome group<\/p>\n<p># pacman -Sg gnome<\/p>\n<p>Removing packages<\/p>\n<p>To remove a single package<\/p>\n<p># pacman -R package_name<\/p>\n<p>To remove a package and its dependencies which are not required by any other installed package<\/p>\n<p># pacman -Rs package_name<\/p>\n<p>To remove a package, its dependencies and all the packages that depend on the target package (This operation is recursive, and must be used with care since it can remove many potentially needed packages.)<\/p>\n<p># pacman -Rsc package_name<\/p>\n<p>To remove a package, which is required by another package, without removing the dependent package (The following operation can break a system and should be avoided.)<\/p>\n<p># pacman -Rdd package_name<\/p>\n<p>Pacman saves important configuration files when removing certain applications and names them with the extension: .pacsave. To prevent the creation of these backup files use the -n option<\/p>\n<p># pacman -Rn package_name<\/p>\n<p>Upgrading packages<\/p>\n<p>Pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date the system is. The following command synchronizes the repository databases and updates the system&#8217;s packages, excluding &#8220;local&#8221; packages that are not in the configured repositories:<\/p>\n<p># pacman -Syu<\/p>\n<p>Querying package databases<\/p>\n<p>Pacman queries the local package database with the -Q flag, the sync database with the -S flag and the files database with the -F flag.<\/p>\n<p>$ pacman -Ss string1 string2 &#8230;<\/p>\n<p>To search for already installed packages:<\/p>\n<p>$ pacman -Qs string1 string2 &#8230;<\/p>\n<p>To search for package file names in remote packages:<\/p>\n<p>$ pacman -Fs string1 string2 &#8230;<\/p>\n<p>To display extensive information about a given package:<\/p>\n<p>$ pacman -Si package_name<\/p>\n<p>For locally installed packages:<\/p>\n<p>$ pacman -Qi package_name<\/p>\n<p>Passing two -i flags will also display the list of backup files and their modification states:<\/p>\n<p>$ pacman -Qii package_name<\/p>\n<p>To retrieve a list of the files installed by a package:<\/p>\n<p>$ pacman -Ql package_name<\/p>\n<p>To retrieve a list of the files installed by a remote package:<\/p>\n<p>$ pacman -Fl package_name<\/p>\n<p>To verify the presence of the files installed by a package:<\/p>\n<p>$ pacman -Qk package_name<\/p>\n<p>Passing the k flag twice will perform a more thorough check.<\/p>\n<p>To query the database to know which package a file in the file system belongs to:<\/p>\n<p>$ pacman -Qo \/path\/to\/file_name<\/p>\n<p>To query the database to know which remote package a file belongs to:<\/p>\n<p>$ pacman -Fo \/path\/to\/file_name<\/p>\n<p>To list all packages no longer required as dependencies (orphans):<\/p>\n<p>$ pacman -Qdt<\/p>\n<p>To list all packages explicitly installed and not required as dependencies<\/p>\n<p>$ pacman -Qet<\/p>\n<p>Pactree<\/p>\n<p>$ pactree package_name<\/p>\n<p>Pactree: To view the dependency tree of a package<\/p>\n<p>$ pactree package_name<\/p>\n<p>Cleaning the package cache<\/p>\n<p># paccache -r<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing specific packages # pacman -S package_name1 package_name2 &#8230; To install a list of packages with regex # pacman -S $(pacman -Ssq package_regex) To install the version from the extra repository # pacman -S extra\/package_name To install a number of packages sharing similar patterns in their names one can use &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-vuwvtm6m4vkbg"],"_links":{"self":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":2,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":3711,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/219\/revisions\/3711"}],"wp:attachment":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}