that was indeed the point of my exercise. i simply wanted to show what happens when you try to do that from a stock(but upgraded) install.
No. Itâs a basic function of an operating system. If not even removing packages can be safe, thatâs a pretty low standard.
I donât think we, as a distro, have much to say about this, other than what Garuda already does.
And I am completely fine with that.
Yeah, I know that. I was arguing to change that default. As in, this is, actually, severely limiting the userâs experience, as so much of the hard space is lost.
And most users probably donât even know, they could clean it.
I would set this down to one level of stored package generations.
I prefer to more aggressively prune these files as well. I rarely need the package cache. Even when I am downgrading a package, itâs usually something that is available in the Arch Linux Archive anyway.
Plus, with Btrfs snapshotting there are even more options for rolling back packages.
Still, just to play devilâs advocate, here are a few considerations why this might not be a desirable default configuration:
- Some users prefer to keep more versions. When it comes to deleting user data, the more conservative option is to allow users to decide for themselves what should be kept or removed.
- Garuda uses two repositories ([garuda] and [chaotic-aur]) which are not backed up by the Arch Linux Archive. If the package cache is deleted, downgrading these packages is not possible. The user would need to restore a Btrfs snapshot to roll back one of these packages.
- Garuda Assistant already includes a built-in tool for cleaning the package cache. If users want to free up some space all they need to do is click the button and put in their password. Honestly this one tool seems like it should be enough for most users.
Instead of setting a default that most users may have difficulty figuring out how to interact with, another idea would be to try to make the current tools more accessible. I think EOS does a pretty good job with this, check out their GUI tool for configuring package cache maintenance:
Ultimately though, I think users who care about this can set it up for themselves because it is not hard.
An easy way to do this would be to set a Pacman hook.
sudo micro /etc/pacman.d/hooks/paccache.hook
[Trigger]
Operation = Remove
Operation = Install
Operation = Upgrade
Type = Package
Target = *
[Action]
Description = Keep the last cache and the currently installed.
When = PostTransaction
Exec = /usr/bin/paccache -rvk2
This will clear all packages from the cache except the currently installed and the one previous after every Pacman transaction. (source)
I would just pop a notification, in case the cache exceeds a certain limit.
In that case, the user gets aware about the functionality, and canât run into dozens of Gigabytes being occupied without knowing why and where.
Similarly, as we notify about partial updates already.
Is this not what this setting is for?
It doesnât work in my case, but I thought its a bug (that I already reported)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.