Tutorial on pacman in Parabola-GNU

This commit is contained in:
Jose 2022-09-10 19:19:23 -03:00
parent d2044072d1
commit e4d03497cb
2 changed files with 78 additions and 0 deletions

View File

@ -32,6 +32,7 @@ opportunity to learn about computers, files, directories and programs.
* [[./tutorial/dd_command_flash_usb.org][Using dd command to flash usb]]
* [[./tutorial/compress_pdf.org][Compress a pdf file]]
* [[./tutorial/luakit.org][Searching and editing configuration files]]
* [[./tutorial/pacman.org][Use package manager in Parabola GNU-linux]]
** File conversion

77
tutorial/pacman.org Normal file
View File

@ -0,0 +1,77 @@
#+date: 2021-07-28
#+options: toc:nil num:nil
* Checking and cleaning packages and package cache in Parabola GNUlinux
** Check the number of packages in cache
[[https://ostechnix.com/recommended-way-clean-package-cache-arch-linux/][Based on this link]] and on Arch linux Wiki
Open a terminal and run the code
#+begin_example sh
sudo ls /var/cache/pacman/pkg/ | wc -l
#+end_example
#+RESULTS:
| 6000 |
#+begin_src bash
du -sh /var/cache/pacman/pkg/
#+end_src
#+RESULTS:
| 7,3G | /var/cache/pacman/pkg/ |
Remove packages in cache, keeping one version (last)
#+begin_example sh
paccache -rk1
#+end_example
#+RESULTS:
|==> finished 1146 packages removed (disk space saved: 4.04 GiB)|
Remove all of uninstalled packages in cache
#+begin_example sh
paccache -ruk0
#+end_example
#+RESULTS:
...90.88 Mib
Run this to see issues in the system
#+begin_example sh
journalctl -p 3 -xb
#+end_example
** Removing unused packages by name
Let's say you want to delete the following packages:
* zim
* mpv
* smplayer
#+begin_example sh
pacman -Rs zim mpv smplayer
#+end_example
** List all installed packages
List and redirect the output to the file "pkglist.txt"
#+begin_example sh
pacman -Qqe > pkglist.txt
#+end_example
List all packages with size
#+begin_example sh
LC_ALL=C pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h
#+end_example