bash-tutorial/tutorial/pacman.org

50 lines
966 B
Org Mode
Raw Permalink Normal View History

2022-09-11 00:19:23 +02:00
#+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
2023-11-09 15:07:34 +01:00
[[https://ostechnix.com/recommended-way-clean-package-cache-arch-linux/][Based on this link]] and on Arch linux [[https://wiki.archlinux.org/title/Pacman/Tips_and_tricks][Wiki]]
2022-09-11 00:19:23 +02:00
Open a terminal and run the code
#+begin_example sh
sudo ls /var/cache/pacman/pkg/ | wc -l
#+end_example
#+RESULTS:
| 6000 |
2023-01-11 11:15:23 +01:00
Check space used by packages (cache)
2022-09-11 00:19:23 +02:00
#+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
2023-11-09 15:07:34 +01:00
#+begin_example sh
pacman -Sc
#+end_example