{"id":265,"date":"2016-07-04T23:02:37","date_gmt":"2016-07-04T22:02:37","guid":{"rendered":"https:\/\/solidt.eu\/blog\/?p=265"},"modified":"2019-08-19T16:09:43","modified_gmt":"2019-08-19T15:09:43","slug":"arch-linux-pacman","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/arch-linux-pacman\/","title":{"rendered":"Arch Linux Pacman"},"content":{"rendered":"\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># missing keys while updating: update keyring package first\nsudo pacman -S archlinux-keyring\n\n# import keys (initial)\npacman-key --init\n# update keys\npacman-key --populate archlinux\n\n# remove a package completely\npacman -Rsn\n# remove even more (dependencies)\npacman -Rscnd\n\n# clear package cache (sometimes uses much disk space)\npacman -Scc\n\n# update all repositories\npacman -Syy\n\n# system upgrade\npacman -Suu\n\n# on existing files in filesystem, add the force parameter\npacman --force\n\n# remove unused packages !warning careful!\npacman -Rsn $(pacman -Qdtq)\n\n# list of packages installed manually\npacman -Qqe\npacman -Qei | awk '\/^Name\/ { name=$3 } \/^Groups\/ { if ( $3 != \"base\" &amp;&amp; $3 != \"base-devel\" ) { print name } }'\n\n#backup + restore\npacman -Qqe > pkglist.txt\npacman -S - &lt; pkglist.txt --needed\n\n# reinstall all native packages\npacman -Qnq | pacman -S -\n\n# optimize pacman database for speed\npacman -Sc &amp;&amp; pacman-optimize\n\n# Get fastest mirrors\ncurl -s \"https:\/\/www.archlinux.org\/mirrorlist\/?country=NL&amp;protocol=https&amp;use_mirror_status=on\" | sed -e 's\/^#Server\/Server\/' -e '\/^#\/d' | rankmirrors -n 5 - > mirrors\nsudo cp mirrors \/etc\/pacman.d\/mirrorlist\n# Or via GUI: https:\/\/www.archlinux.org\/mirrorlist\/<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-265","post","type-post","status-publish","format-standard","hentry","category-other-scripts"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=265"}],"version-history":[{"count":13,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/265\/revisions"}],"predecessor-version":[{"id":2505,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/265\/revisions\/2505"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}