Hi John,

On Sat, Feb 07, 2026 at 09:58:42PM -0500, John Haman wrote:
> Hi Guix Users - Is there a Guix command that would allow me to upgrade my
> system to the latest packages, but only those for which substitutes are
> available? Alternatively, would it be possible to prohibit certain
> packages from upgrade if the substitutes are not available?
(...)

The short answer is there's isn't a great way to do this.

There's a 'channels-with-substitutes' function [0] that you can use, though it 
doesn't guarantee that all the packages will have substitutes available for 
them. 

I do it manually by putting my packages into manifest files by channel. Here 
are the steps.

1. Break applications into manifest files by channel (e.g. apps-guix.scm, 
apps-nonguix.scm)

2. I check the data service to find the last revision with substitutes built:

Guix: https://data.qa.guix.gnu.org/repository/1/branch/master

There's a button for "Latest processed revision" which takes you to a specific 
revision of the archive. The associated git commit hash can be found by 
clicking "View cgit". 

For example, lets say it gave me this one:

    
https://codeberg.org/guix/guix/commit/0689ad6dd09ca212f5b62efcbe6ac2921cf2b03a

3. Create a new channels.scm file
I'm going to use the channels file and the commits in it later. For now I need 
it to fix the commit for guix 'time-machine'

    guix describe --format=channels > `date +%Y%m%d`-channels.scm

I go into the channels.scm file and remove any channels that I'm not updating. 
So it looks like this:

  (list
    (channel
      (name 'guix)
      (url "https://git.guix.gnu.org/guix.git";)
      (branch "master")
      (commit
        ;change commit to the one we got above
        "0689ad6dd09ca212f5b62efcbe6ac2921cf2b03a")
      (introduction
        (make-channel-introduction
          "9edb3f66fd807b096b48283debdcddccfea34bad"
        (openpgp-fingerprint
          ""BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))

4. Move to the commit using guix time-machine
This creates a temporary environment and I share where the manifests are kept. 

   guix time-machine --channels=20260212-channels.scm -- shell --container 
--network \
                         --nesting --share=/home/<user>/.config/guix/manifests/ 
nss-certs coreutils

   [env] guix describe
     guix 06891d6
     repository URL: https://git.guix.gnu.org/guix.git
     branch: master
     commit: 0689ad6dd09ca212f5b62efcbe6ac2921cf2b03a

The I do:

    guix weather --substitute-urls='https://bordeaux.guix.gnu.org' 
--display-missing 
--manifest=/home/steve/.config/guix/manifests/guix-core-apps.scm

It will give a warning about substitutes not being authorised but that's fine 
as we're not using it. Then it shows whether the substitutes are available for 
that manifest.

If they are we can update the system.

5. Hosted: update the root user
For some systems I am using Guix hosted, for me that's on top of Ubuntu. I 
update the 'guix daemon' like so:

  sudo -i guix pull --commit=0689ad6d
  # restart the systemd service

6. Hosted: use the channels.scm
I have a script to update the various manifests, but it basically does:

  guix pull --channels=<file>
  guix package --manifest=<manifest> --install

7. Guix System: update hashes
For my Guix System VM's I update the configuration files with the new commit 
hash. Reconfigure:

    # load the new commit hash
    sudo -i guix system --load-path=$HOME/workspace/guix-sys reconfigure \
      --no-bootloader ~/workspace/guix-sys/systems/<someimage.scm>

  guix pull
  guix describe

  # reconfigure using the new definitions
  sudo -i guix system --load-path=$HOME/workspace/guix-sys reconfigure \
    ~/workspace/guix-sys/systems<blah file>

That's it - easy!

Steve / Futurile

[0] https://guix.gnu.org/manual/devel/en/guix.html#Channels-with-Substitutes

Reply via email to