yay
yay copied to clipboard
Don't remove compiled packages that are installed when running yay -Sc
When you install a package using pacman, the compressed package that you download gets stored on the local package database /var/cache/pacman/pkg/
. This is really useful, because it means you can reinstall a package anytime without an internet connection.
When yay builds a package from its PKGBUILD
using makepkg
, a compressed package is created on ~/.cache/yay/$package/
. However, these packages get deleted every time you run yay -Sc
. Now, if you want to reinstall an aur package, you need to recompile it AND you also need an internet connection, since it has to download the sources again.
Therefore, it would be really nice to have a way to keep the compiled (compressed) package. To make things consistent with pacman, yay shouldn't delete those compiled packages that are installed when running yay -Sc
. Similarly to pacman, this should only happen when running yay -Scc
: these "backups" would then get deleted, even if they correspond to currently installed packages.
Optionally a --keep <number>
option for keeping the most recent package builds like paccache
does.
*.pkg.*
should now be excluded from clean