Resource-hungry update

pamac informed me today (20/05) that there were updates ready to install.
Size of updates was 1,1GB. I had 22GB of free disk space.
After installation, rebooting system I have 20,5GB of free disk space.

It means that update consumed 1,5GB of my disk.
I thought that updates means to overwrite old packages/apps and install the one ones.
But it seems that new ones are installed along the old ones.

How to reclaim my disk space?

No, the new packages do indeed replace the installed ones, but the new packages need to be downloaded first, and they will be stored in /var/cache/pacman/pkg. It is from there that they will then be installed, replacing the older versions.

If you want to completely clean out that cache, issue the following command in a terminal… :arrow_down:

sudo paccache -rvk0

If you want to keep (only) the most recent generation of the packages in the cache, issue…

sudo paccache -rvk1
3 Likes

Can also be done with regular pacman command:

sudo pacman -Scc

and

sudo pacman -Sc
3 Likes

Thank you @Aragorn and @Strit .
Maybe it is good idea to add this command to the end of update procedure in pamac?

1 Like

No, that would be a Bad Idea™, because everyone maintains different practices on how many generations of packages they wish to keep. :wink:

1 Like

No. People might wish to keep older versions of packages, either for testing or to fix something, if something broke in the update.

2 Likes

ahhh, OK. Maybe just option for newbies like me. :wink:

Anyway for future, if I would like go back to the previous version of a package then how should I do it?
What are the steps?

$ sudo pacman -U /var/cache/pacman/pkg/$package-with-the-version-you-want-and-still-have-in-this-cache.tar.zst
3 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.