From e4d03497cb132593b5a6ead7c54e55503d552f36 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 10 Sep 2022 19:19:23 -0300 Subject: [PATCH] Tutorial on pacman in Parabola-GNU --- README.org | 1 + tutorial/pacman.org | 77 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 tutorial/pacman.org diff --git a/README.org b/README.org index ee05316..6702f73 100644 --- a/README.org +++ b/README.org @@ -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 diff --git a/tutorial/pacman.org b/tutorial/pacman.org new file mode 100644 index 0000000..cfc6328 --- /dev/null +++ b/tutorial/pacman.org @@ -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