Sync
First let’s sync,
sudo pacman -Sy
To do system update and upgrade,
sudo pacman -Syu
Important
instead of “-Syu”, do “-Syyu” to force update
Installation
To install a package,
sudo pacman -S
_package-name_
To install as dependency,
sudo pacman -S --asdeps
package-name
To install if it’s not installed (—needed) and without confirmation (—norconfirm)
sudo pacman -S --needed --noconfirm
_package-name_
Important
Here package-name means the name of the specific package you want to install
Now, what to install?
Useful Linux Applications
This list’s formatting is “Applications name” and “short description”.
https://sharafat.pages.dev/useful-linux-applications/
Install with all optional dependencies as dependency,
sudo pacman -S --asdeps --needed $(pacman -Si
```````````` ``````````` `````````` ````````` ```````` ``````` `````` ````` ```` ``` `` `package-name` `` ``` ```` ````` `````` ``````` ```````` ````````` `````````` ``````````` ````````````
| sed -n '/^Opt/,/^Conf/p' | sed '$d' | sed 's/^Opt.*://g' | sed 's/^\s*//g' | tr '\n' ' ')
or, copy from here,
sudo pacman -S --asdeps --needed $(pacman -Si package-name | sed -n '/^Opt/,/^Conf/p' | sed '$d' | sed 's/^Opt.*://g' | sed 's/^\s*//g' | tr '\n' ' ')
Listing packages
To get all software’s list (explicitly installed + dependency),
system package + manually installed later + dependency
pacman -Q
Important
Also try “pacman -Q package-name”
To get only explicitly installed applications
system package + manually installed later + not dependency
pacman -Qe
To get only explicitly installed app without system packages
not system package + manually installed later + not dependency
pacman -Qet
To get only dependency, aka orphans,
not system package + not manually installed later + dependency
pacman -Qdt
Important
sudo permission isn’t required!
-
Output to a text file!
Run, something like,
pacman -Qet > packages.txt
Removing packages
To remove, just -R is fine,
sudo pacman -R
```````````` ``````````` `````````` ````````` ```````` ``````` `````` ````` ```` ``` `` `package-name` `` ``` ```` ````` `````` ``````` ```````` ````````` `````````` ``````````` ````````````
And to remove orphans,
sudo -S pacman -R --noconfirm $(pacman -Qdtq)
Further assistance
pacman
The pacman package manager is one of the major distinguishing features of Arch Linux.
https://wiki.archlinux.org/title/Pacman