joplin-notes/joplin notion extension/linux/endeavour os/Basics.md
2026-11-04 00:33:23 +05:30

12 lines
No EOL
760 B
Markdown

Basics
- In arch based never do `pacman -Sy`. always do `pacman -S` or `pacman -Sy` bcz if repos are partially updated then it will break things
- list all packages with sizes sorted with size too
`pacman -Qi | awk '/^Name/{name=$3}/^Installed Size/{size=$4; unit=$5; if(unit=="MiB") size*=1024; print name, size, unit}' | sort -k2,2nr | awk '{size=$2; unit=$3; if(size>=1048576) {printf "%-30s %.2f GiB\n", $1, size/1048576} else if(size>=1024) {printf "%-30s %.2f MiB\n", $1, size/1024} else {printf "%-30s %d KiB\n", $1, size}}'
`
mentioning packages with size with no sorting
`pacman -Qi | awk '/^Name/{name=$3}/^Installed Size/{size=$4 " " $5; print name, size}'`
- list orphan package
`pacman -Qdt`
to remove them run
`pacman -Rns $(pacman -Qdtq)`