64 lines
No EOL
1.9 KiB
Markdown
64 lines
No EOL
1.9 KiB
Markdown
Basics
|
|
|
|
- To get a list of installed packages
|
|
`pacman -Qqe`
|
|
for all gtk packages
|
|
`pacman -Qs gtk`
|
|
for gtk version
|
|
`pacman -Q gtk`
|
|
|
|
- To get list of package information including all dependencies it needs
|
|
`pacman -Si nodejs`
|
|
|
|
|
|
|
|
|
|
- downloading build files ie tar.zst
|
|
you go to https://archlinux.org/packages/
|
|
find the package you want
|
|
in the top-right corner of the package's page, you click the download from mirror button, you do that for every package you want
|
|
|
|
- to get info of package
|
|
`pamac info <pkg_name>`
|
|
or
|
|
`yay -Si <pkg_name>`
|
|
|
|
- to search repos and aur with keyword
|
|
`yay -Ss straw` here straw is keyword
|
|
|
|
- to not reinstall package use
|
|
`yay -S --needed strawberry`
|
|
|
|
- to get users and group list
|
|
https://devconnected.com/how-to-list-users-and-groups-on-linux/
|
|
`cat /etc/passwd | cut -d: -f1`
|
|
`cat /etc/passwd | awk -F: '{print $1}'`
|
|
For connected users:
|
|
`who`
|
|
or
|
|
`users` for less details
|
|
|
|
For groups
|
|
`cat /etc/group`
|
|
About its output
|
|
first col is group name
|
|
sec col : password
|
|
3rd: group id
|
|
4th: users in the group
|
|

|
|

|
|
- To complete remove packages
|
|
`pacman -Rns package_name`
|
|
The -Rns flags tell pacman to remove the packages, their configuration files (n), and their unneeded dependencies (s).
|
|
- Removing orphan package completely
|
|
First, you need to identify the orphaned packages. This can be done using the pacman package manager with the following command:
|
|
|
|
`pacman -Qdt`
|
|
|
|
|
|
|
|
To remove these orphaned packages, you can use the same pacman command with the remove (-R) option:
|
|
|
|
`pacman -Rns $(pacman -Qdtq)`
|
|
- When installing packages from pacman and we dont want any prompt and want the feafult in `[y/n]` then use the flag `--noconfirm`
|
|
`pacman -s firefox --noconfirm` |