50 lines
966 B
Org Mode
50 lines
966 B
Org Mode
#+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 [[https://wiki.archlinux.org/title/Pacman/Tips_and_tricks][Wiki]]
|
|
|
|
Open a terminal and run the code
|
|
|
|
#+begin_example sh
|
|
sudo ls /var/cache/pacman/pkg/ | wc -l
|
|
#+end_example
|
|
|
|
#+RESULTS:
|
|
| 6000 |
|
|
|
|
Check space used by packages (cache)
|
|
|
|
#+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
|
|
|
|
#+begin_example sh
|
|
pacman -Sc
|
|
#+end_example
|