From e555f6e1f138614231ddfff677fb978b93d7727c Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 11 Jan 2023 07:15:23 -0300 Subject: [PATCH] Split tutorial on pacman --- README.org | 5 +++-- tutorial/pacman.org | 2 ++ tutorial/removing_packages.org | 31 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 tutorial/removing_packages.org diff --git a/README.org b/README.org index cec021a..e04482c 100644 --- a/README.org +++ b/README.org @@ -37,8 +37,9 @@ 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]] - + * [[./tutorial/pacman.org][Use package manager in Parabola GNU-linux: verify packages in cache]] + * [[./tutorial/removing_packages.org][Removing packages in Parabola GNU-Linux]] + ** Disk space utilization and manipulation * [[./tutorial/ncdu.org][Exploring disk space with 'ncdu']] diff --git a/tutorial/pacman.org b/tutorial/pacman.org index cfc6328..889872a 100644 --- a/tutorial/pacman.org +++ b/tutorial/pacman.org @@ -16,6 +16,8 @@ Open a terminal and run the code #+RESULTS: | 6000 | +Check space used by packages (cache) + #+begin_src bash du -sh /var/cache/pacman/pkg/ #+end_src diff --git a/tutorial/removing_packages.org b/tutorial/removing_packages.org new file mode 100644 index 0000000..616fbcf --- /dev/null +++ b/tutorial/removing_packages.org @@ -0,0 +1,31 @@ +#+date: 2021-07-28 +#+options: toc:nil num:nil + +* Checking and cleaning packages and package cache in Parabola GNUlinux + +** 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