78 lines
1.4 KiB
Org Mode
78 lines
1.4 KiB
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 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
|