[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message by a novice

From: Edouard Klein
Subject: Re: Message by a novice
Date: Sun, 14 May 2023 08:40:38 +0200
User-agent: mu4e 1.8.13; emacs 28.2

Hi !

First, drop sudo, guix can be run by unprivileged users once installed,
and will only affect them. Great for shared environments !

anguriamelone--- via <> writes:

> Hi to everyone.
> I am a novice in GNU Guix, so far I used Trisquel GN-Linux 9.0.2 (i686), but 
> at the end of April the support for the i686 version has been discontinued. 
> Nevertheless I want to continue using free (as in freedom) software and, 
> getting set to install the iso image, if I don't ask for too muchas an 
> abosulte beginner, I would like to know what are the basic command lines 
> corresponding to those of Trisquel GNU-Linux below:
> sudo apt update

guix pull

> sudo apt upgrade

For the system:
sudo guix system reconfigure /etc/config.scm

For your user packages
guix package --upgrade

> sudo apt install (package name)

guix install <package-name>

> sudo apt remove --purge (package name)

guix remove <package-name>

Subtle differences with '--purge'. The package will be removed from your
profile, but still be available in the store, and local conf (typically
in ~/.conf/...) will still be there, and need to be removed manually.
But it would have been put manually by you if it exists there, so guix
is consistent.

> sudo apt search (package name)

Don't use sudo for apt search.

guix search <keywords>...

> sudo apt autoremove
> sudo apt purge
> sudo apt autoclean
> sudo apt clean

Guix is very different from apt, there is no direct mapping for those
last four.

To reclaim disk space, run guix gc more or less aggressively.

Here is the doc:
Here are some notes on very aggressively reclaiming disk space:

  See how much space the store uses
  : du -h -d0 /gnu/store
  : 26G     /gnu/store
  See all the roots that you have
  : guix gc --list-roots | sort
  : ...  a lot of generations from my different profiles
  : guix gc --list-roots | wc -l
  : 107
  Delete previous generations, you may be more or less aggresive with
  the options. Giving no options deletes all generations but the 0th one and 
the current one. Do this for every profile.
  List all existing profiles
  : guix gc --list-roots | sed 's/-[0-9]*-link$//' | sort | uniq
  Delete the maximum amount of generations from all the profiles
  : for profile in $(guix gc --list-roots | sed 's/-[0-9]*-link$//' | sort | 
  : do
  : echo deleting generations in "$profile";
  : guix package --profile="$profile" --delete-generations;
  : done
  WARNING: you may want to keep all the genrations from =current-guix= (see 
[[sec:default-profiles]]), because they don't take up much space, and they will 
allow you to rebuild the packages from a previously installed and known-good 
version of guix, instead of having to bisect your way to a working version with 
=guix time-machine= as we did in [[sec:bisect]].
  You can also delete the profiles you are no longer interested in. Delete with 
=rm= the =guix_profile= (or whatever you called it) link and the 
=guix_profile-NN-link= that guix added. These will no longer appear in the 
roots, and therefore the packages they were referencing will be deleteable by 
the garbage collector.
  Then, run =guix pull=, and update the packages in all your profiles:
  : for profile in $(guix gc --list-roots | sed 's/-[0-9]*-link$//' | sort | 
uniq); do echo upgrading packages in  "$profile"; guix package 
--profile="$profile" --upgrade; done
  This will allow all common packages between your profiles to be de-duplicated 
in the store, because they will be at the same exact version, whereas if one 
was more recent than the other, both versions would be kept in the store, using 
up disk space. FIXME(ref the section that explain the store and the 
  Once all of this is done, the garbage collector can now be launched:
  : guix gc
  : du -h -d0 /gnu/store
  : 6,6G    /gnu/store

There are also some directories in .cache that you can remove manually.

Hope that helps.



>    Thanks for the attention and kind regards.
>                   Piriponzolo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]