unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Edouard Klein <edou@rdklein.fr>
To: anguriamelone@libero.it
Cc: help-guix@gnu.org
Subject: Re: Message by a novice
Date: Sun, 14 May 2023 08:40:38 +0200	[thread overview]
Message-ID: <878rdrbe42.fsf@rdklein.fr> (raw)
In-Reply-To: <1588018684.919240.1684002697666@mail1.libero.it>

Hi !

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

anguriamelone--- via <help-guix@gnu.org> 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:
https://guix.gnu.org/manual/en/guix.html#Invoking-guix-gc
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 | uniq)
  : 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 deduplication).
  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.

Cheers,

Edouard.


>    Thanks for the attention and kind regards.
>
>                   Piriponzolo
>
>


  reply	other threads:[~2023-05-14  6:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-13 18:31 Message by a novice anguriamelone--- via
2023-05-14  6:40 ` Edouard Klein [this message]
2023-05-14  6:58 ` 宋文武
2023-05-14 12:49   ` Csepp
2023-05-14  7:59 ` (
2023-05-14 14:52 ` Felix Lechner via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rdrbe42.fsf@rdklein.fr \
    --to=edou@rdklein.fr \
    --cc=anguriamelone@libero.it \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).