Re: How to delete per-user profiles

2023-08-30 Thread Jorge P . de Morais Neto
Thanks 宋文武 and Roman!  I have then deleted
`/var/guix/profiles/per-user/jorge-morais' and then invoked `sudo -i
guix gc -d'.  It went as expected.  If any error appears later, I will
inform this list.

Regards!

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Free Software Supporter: https://www.fsf.org/free-software-supporter
- If an email of mine arrives at your spam box, please notify me.
- Many people hate injustice but few check the facts; this causes more
  injustice.  Ask me about 



Re: How to delete per-user profiles

2023-08-29 Thread Roman Riabenko via
У сб, 2023-08-26 у 09:13 +0300, Roman Riabenko пише:
> У пт, 2023-08-25 у 17:01 -0300, Jorge пише:
> > I have removed (via Gnome Settings) user `jorge-morais' from my
> > Gentoo GNU/Linux system, but its Guix profiles remain.  
> 
> If you only remove a user from GNOME Settings without removing it
> from
> the system configuration file, the user will re-appear in GNOME
> Settings on reboot or the next time the system is reconfigured and a
> home directory will be created for it if it was removed. (Such user
> would not appear in the login screen because the user is only re-
> created but not activated. The activation can be done in GNOME
> Settings.) Instead, to remove a user, you should remove its "user-
> account" form from the system configuration file [1] and reconfigure
> the system. You have to handle the user files yourself, e.g. remove
> the
> user's home directory. If you are also adding a user, you would want
> to
> do that in the configuration file too.
> 
> [1]:
> https://guix.gnu.org/en/manual/devel/en/html_node/User-Accounts.html

Sorry, I've just noticed that you are on Gentoo, not a Guix System, so
you manage the users from Gentoo, not from the guix configuration file.

> > How do I remove them, so Guix GC can clean the store?  Can I simply
> > remove the directory `/var/guix/profiles/per-user/jorge-morais' ?
> 
> Those links are not removed automatically, so that directory needs to
> be removed by hand. When the links are removed and eventually you run
> "guix gc", it removes the unused profiles in the store.

This still applies.

Roman


signature.asc
Description: This is a digitally signed message part


Re: How to delete per-user profiles

2023-08-29 Thread Roman Riabenko via
У пт, 2023-08-25 у 17:01 -0300, Jorge пише:
> I have removed (via Gnome Settings) user `jorge-morais' from my
Gentoo GNU/Linux system, but its Guix profiles remain.  

If you only remove a user from GNOME Settings without removing it from
the system configuration file, the user will re-appear in GNOME
Settings on reboot or the next time the system is reconfigured and a
home directory will be created for it if it was removed. (Such user
would not appear in the login screen because the user is only re-
created but not activated. The activation can be done in GNOME
Settings.) Instead, to remove a user, you should remove its "user-
account" form from the system configuration file [1] and reconfigure
the system. You have to handle the user files yourself, e.g. remove the
user's home directory. If you are also adding a user, you would want to
do that in the configuration file too.

[1]:
https://guix.gnu.org/en/manual/devel/en/html_node/User-Accounts.html

> How do I remove them, so Guix GC can clean the store?  Can I simply
remove the directory `/var/guix/profiles/per-user/jorge-morais' ?

Those links are not removed automatically, so that directory needs to
be removed by hand. When the links are removed and eventually you run
"guix gc", it removes the unused profiles in the store.

Roman









signature.asc
Description: This is a digitally signed message part


Re: How to delete per-user profiles

2023-08-25 Thread 宋文武
Jorge  writes:

> Hi!  I have removed (via Gnome Settings) user `jorge-morais' from my 
> Gentoo GNU/Linux system, but its Guix profiles remain.  How do I remove 
> them, so Guix GC can clean the store?  Can I simply remove the directory 
> `/var/guix/profiles/per-user/jorge-morais' ?

Yes, that's the right and safe thing to do.