Hey there. I use yay -Suy to upgrade all my installed packages. Furthermore I use paccache to only keep the latest 3 packages of all the installations in the /var/cache/pacman/pkg directory and remove the older ones. But it seems that all packages from the AUR installed via yay are stored in a .cache/yay folder in my home directory. They are not removed by paccache.
How can I have them removed automatically?
hi,
paccache dont touch thinks in your own cache directory
if you do , yay (-Sa) aurPackageXX --cleanafter , it cleans after. if you do yay -Sc answer the first questions with No , but then it ask to remove the yay cache direcory… if you say yes it removes.
Thank you!
yay -Scc
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] n
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] n
Build directory: /home/joe/.cache/yay
==> Do you want to remove ALL AUR packages from cache? [Y/n] y
removing AUR packages from cache...
yay -Yc
[sudo] password for judd:
comprobando dependencias...
Paquetes (4) go-2:1.13-1 help2man-1.47.11-1 meson-0.51.2-1 ninja-1.9.0-1
Tamaño total quitado: 484,22 MiB
:: ÂżDesea quitar estos paquetes? [S/n]
:: Ejecutando los «hooks» de preinstalación...
(1/1) Removing old entries from the info directory file...
:: Procesando los cambios de los paquetes...
(1/4) quitando meson [######################] 100%
(2/4) quitando ninja [######################] 100%
(3/4) quitando help2man [######################] 100%
(4/4) quitando go [######################] 100%
:: Ejecutando los «hooks» de posinstalación...
(1/1) Arming ConditionNeedsUpdate...
yay -Ps
Yay version v9.2.0
===========================================
Total installed packages: 912
Total foreign installed packages: 8
Explicitly installed packages: 338
Total Size occupied by packages: 5.9 GiB
===========================================
Ten biggest packages:
linux-firmware: 464.8 MiB
spotify: 272.9 MiB
firefox: 187.9 MiB
chromium: 175.1 MiB
boost: 167.5 MiB
thunderbird: 156.5 MiB
python: 144.5 MiB
gcc: 139.0 MiB
linux-lts: 126.6 MiB
gcc-libs: 116.4 MiB
===========================================
:: Querying AUR...
your post reminds me on linking users to the sources!
OK. That’s what I did and that’s how it worked. Can you tell me the difference between -Sc and -Scc? I only used the -Sc version but it worked anyway.
Is it possible, to have yay clean say like the oldest packages from your ~/.cache after updating the system? I mean like similar to how paccach does it?
But if you have a program or have a specifik kernel frol aur that is written in c, sometimes ti keep those sources can speed up the build time with ccache. Info https://wiki.archlinux.org/index.php/Ccache. Only programs written in c to keep those in is handy, speedup atleast a bit
Thanks for this tip, very useful. Quick question: I was wondering why the default answer for cleaning cache directory (/var/cache/pacman/pkg/
) is “no”. If I understand correctly, the cache files are only used if a (specific version of a) package needs to be re-installed and are not needed when programs run normally, so deleting them should have no impact on performance. Only on how fast a package can be re-installed. If I have a fast connection but am running low on disk space, those cache files aren’t really worth keeping, right?
Thanks.
not really or not always… yes but just in case… something break your network drivers? Could be useful to be able to downgrade packages and deps…
And there is:
Yay is only holding sources and PKGBUILDS from formerly installed and installed AUR builds itself…
And yea the ~/.cache/yay/ files can get removed… it will simply redownload them on updates what can take more time.
Package backups are stored by pacman in its cache path.
If you want to discuss this more… open a fresh thread/post and add a link to this on in case.
–closing–