-- Leo's gemini proxy

-- Connecting to tilde.pink:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;

Garbage Collection in GUIX System


2023-06-03


GUIX is both a distro independent package manager and a Linux distribution (called GUIX SD or GUIX System). One of the things that makes it trully unique is that it allows you to keep multiple versions of the same package installed at the same time along with all necessary dependencies.


This is achieved by storing unique versions of the packages in the /gnu/ store while linking each version into separate profiles (or the main system). While it is not always clear - you can have two versions of the same package installed, but if they are incompatible, your profile can you link one of them.


Both your user profile, as well as the GUIX system are versioned, and you can rollback changes to an earlier generations if needed. But this always confuses me a little bit when I want to clear out space in my system. So, here is the short version:


To remove unused package versions call: guix gc

But this will not remove package versions still used by old generations, so first you need to call guix package --delete-generations

However this only affects your user, so you need something similar for the system packages, using sudo and guix system


Here is my cleanup script:


guix package --delete-generations
guix gc
sudo guix system delete-generations
sudo guix gc


References


Invoking GUIX gc

Invoking GUIX system


-- Response ended

-- Page fetched on Sun May 19 12:06:22 2024