yay icon indicating copy to clipboard operation
yay copied to clipboard

Don't remove compiled packages that are installed when running yay -Sc

Open IslandC0der opened this issue 4 years ago • 1 comments

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.

IslandC0der avatar Mar 29 '20 14:03 IslandC0der

Optionally a --keep <number> option for keeping the most recent package builds like paccache does.

unai-ndz avatar Apr 08 '20 18:04 unai-ndz

*.pkg.* should now be excluded from clean

Jguer avatar Apr 06 '23 17:04 Jguer