Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to only clear caches from yay (leave pacman parts untouched) #2444

Open
t-nil opened this issue May 10, 2024 · 0 comments
Open

Command to only clear caches from yay (leave pacman parts untouched) #2444

t-nil opened this issue May 10, 2024 · 0 comments
Labels
Status: Discussion Open Topic is being considered and open for discussion Type: Feature Request

Comments

@t-nil
Copy link

t-nil commented May 10, 2024

Is your feature request related to a problem? Please describe.

I'm always frustrated when I enter yay -Sc --noconfirm to clean up substantial amounts of space (primarily build artifacts and packages in .cache/yay), but yay also removes older versions of installed packages from my pacman cache.

I understand that pacmans behaviour is the same when using -Sc, but that's why I use paccache. Having older versions of packages has quite literally saved my day multiple times.

Describe the solution you'd like

yay -Sc --aur (or similar) doing only the last two steps of cleaning (remove all other AUR packages from cache / remove ALL untracked AUR files). Sadly yay -Yc is already taken

Ideally also a corresponding option, to be remembered in config.json.

Describe alternatives you've considered

Running echo -ne n\ny\ny\ny | yay -Sc

Although it is doable, it makes the clean command a lot less ergonomic (which it clearly is meant to be, since it tries to one-command clean all relevant parts of both package managers). Also, losing a lot of old package versions by accident is no joke IMHO.

Additionally, I personally find the info "Packages to keep: All locally installed packages" misleading, because to me that's to close to "delete only versions of not installed packages", while it actually (apparently) means "delete every version of a package thats not the installed one). So maybe additionally add CAVEATs to manpage and command output?

Additional context

#354 is not about the same problem but mentions the behaviour

@t-nil t-nil added Status: Discussion Open Topic is being considered and open for discussion Type: Feature Request labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Discussion Open Topic is being considered and open for discussion Type: Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant