* delete profile
@ 2017-03-12 17:28 Federico Beffa
2017-03-13 19:35 ` Alex Kost
2017-03-14 13:26 ` Ludovic Courtès
0 siblings, 2 replies; 14+ messages in thread
From: Federico Beffa @ 2017-03-12 17:28 UTC (permalink / raw)
To: guix-devel
Hi,
I've created a profile for test purposes with
guix package -p $HOME/guix-test-profile -m test-manifest.scm
that now I would like to delete. I've looked up the documentation but
not found any suitable command. What's the recommended procedure to
delete it?
Thanks,
Fede
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-12 17:28 delete profile Federico Beffa
@ 2017-03-13 19:35 ` Alex Kost
2017-03-14 5:55 ` Pjotr Prins
2017-03-14 13:26 ` Ludovic Courtès
1 sibling, 1 reply; 14+ messages in thread
From: Alex Kost @ 2017-03-13 19:35 UTC (permalink / raw)
To: Federico Beffa; +Cc: guix-devel
Federico Beffa (2017-03-12 18:28 +0100) wrote:
> Hi,
>
> I've created a profile for test purposes with
>
> guix package -p $HOME/guix-test-profile -m test-manifest.scm
>
> that now I would like to delete. I've looked up the documentation but
> not found any suitable command. What's the recommended procedure to
> delete it?
I would simply remove it and all its generations
("$HOME/guix-test-profile-XX-link") manually. I don't know if there is
any recommended way to do it though.
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-13 19:35 ` Alex Kost
@ 2017-03-14 5:55 ` Pjotr Prins
2017-03-14 8:42 ` Federico Beffa
2017-03-14 14:28 ` Alex Kost
0 siblings, 2 replies; 14+ messages in thread
From: Pjotr Prins @ 2017-03-14 5:55 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel, Federico Beffa
On Mon, Mar 13, 2017 at 10:35:56PM +0300, Alex Kost wrote:
> Federico Beffa (2017-03-12 18:28 +0100) wrote:
>
> > Hi,
> >
> > I've created a profile for test purposes with
> >
> > guix package -p $HOME/guix-test-profile -m test-manifest.scm
> >
> > that now I would like to delete. I've looked up the documentation but
> > not found any suitable command. What's the recommended procedure to
> > delete it?
>
> I would simply remove it and all its generations
> ("$HOME/guix-test-profile-XX-link") manually. I don't know if there is
> any recommended way to do it though.
That removes the symlinks to a directory in /var/guix/profiles. I
think you also need to remove the links in the latter if you want the
garbage collection to work.
Is that correct?
Pj.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-14 5:55 ` Pjotr Prins
@ 2017-03-14 8:42 ` Federico Beffa
2017-03-14 14:36 ` Alex Kost
2017-03-14 14:28 ` Alex Kost
1 sibling, 1 reply; 14+ messages in thread
From: Federico Beffa @ 2017-03-14 8:42 UTC (permalink / raw)
To: Pjotr Prins; +Cc: guix-devel, Alex Kost
Pjotr Prins <pjotr.public12@thebird.nl> writes:
> On Mon, Mar 13, 2017 at 10:35:56PM +0300, Alex Kost wrote:
>> Federico Beffa (2017-03-12 18:28 +0100) wrote:
>>
>> > Hi,
>> >
>> > I've created a profile for test purposes with
>> >
>> > guix package -p $HOME/guix-test-profile -m test-manifest.scm
>> >
>> > that now I would like to delete. I've looked up the documentation but
>> > not found any suitable command. What's the recommended procedure to
>> > delete it?
>>
>> I would simply remove it and all its generations
>> ("$HOME/guix-test-profile-XX-link") manually. I don't know if there is
>> any recommended way to do it though.
>
> That removes the symlinks to a directory in /var/guix/profiles. I
> think you also need to remove the links in the latter if you want the
> garbage collection to work.
'guix -p $HOME/guix-test-profile' lists only 1 generation (but I did
create another one and then I rolled-back).
I run 'guix gc' and now I find dangling symlinks in my $HOME. One
symlink is still active (the active generation) which imply that it is
registered as a GC root. However, it's not in
'/usr/local/var/guix/profiles' (I installed from source with the default
prefix=/usr/local). Not sure where to find it.
Thanks for the suggestions.
Fede
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-12 17:28 delete profile Federico Beffa
2017-03-13 19:35 ` Alex Kost
@ 2017-03-14 13:26 ` Ludovic Courtès
1 sibling, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2017-03-14 13:26 UTC (permalink / raw)
To: Federico Beffa; +Cc: guix-devel
Hi,
Federico Beffa <beffa@ieee.org> skribis:
> I've created a profile for test purposes with
>
> guix package -p $HOME/guix-test-profile -m test-manifest.scm
>
> that now I would like to delete. I've looked up the documentation but
> not found any suitable command. What's the recommended procedure to
> delete it?
I just do:
rm $HOME/guix-test-profile*
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-14 5:55 ` Pjotr Prins
2017-03-14 8:42 ` Federico Beffa
@ 2017-03-14 14:28 ` Alex Kost
2017-03-14 15:18 ` Pjotr Prins
1 sibling, 1 reply; 14+ messages in thread
From: Alex Kost @ 2017-03-14 14:28 UTC (permalink / raw)
To: Pjotr Prins; +Cc: guix-devel, Federico Beffa
Pjotr Prins (2017-03-14 05:55 +0000) wrote:
> On Mon, Mar 13, 2017 at 10:35:56PM +0300, Alex Kost wrote:
>> Federico Beffa (2017-03-12 18:28 +0100) wrote:
>>
>> > Hi,
>> >
>> > I've created a profile for test purposes with
>> >
>> > guix package -p $HOME/guix-test-profile -m test-manifest.scm
>> >
>> > that now I would like to delete. I've looked up the documentation but
>> > not found any suitable command. What's the recommended procedure to
>> > delete it?
>>
>> I would simply remove it and all its generations
>> ("$HOME/guix-test-profile-XX-link") manually. I don't know if there is
>> any recommended way to do it though.
>
> That removes the symlinks to a directory in /var/guix/profiles.
No, "$HOME/guix-test-profile" was not a symlink to
"/var/guix/profiles/...". Try this:
guix package --no-grafts -i hello -p /tmp/test-profile
ls -l /tmp/test-profile*
As you can see, now there is "/tmp/test-profile" which points to a
single generation which points to "/gnu/store…-profile".
> I think you also need to remove the links in the latter if you want
> the garbage collection to work.
>
> Is that correct?
No, as you can see "/var/guix/profiles/..." was not modified in any way.
So removing "/tmp/test-profile*" links should be enough; next time "guix
gc" will remove the store entries for the created profile.
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-14 8:42 ` Federico Beffa
@ 2017-03-14 14:36 ` Alex Kost
2017-03-14 16:43 ` Federico Beffa
0 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2017-03-14 14:36 UTC (permalink / raw)
To: Federico Beffa; +Cc: guix-devel
Federico Beffa (2017-03-14 09:42 +0100) wrote:
> Pjotr Prins <pjotr.public12@thebird.nl> writes:
>
>> On Mon, Mar 13, 2017 at 10:35:56PM +0300, Alex Kost wrote:
>>> Federico Beffa (2017-03-12 18:28 +0100) wrote:
>>>
>>> > Hi,
>>> >
>>> > I've created a profile for test purposes with
>>> >
>>> > guix package -p $HOME/guix-test-profile -m test-manifest.scm
>>> >
>>> > that now I would like to delete. I've looked up the documentation but
>>> > not found any suitable command. What's the recommended procedure to
>>> > delete it?
>>>
>>> I would simply remove it and all its generations
>>> ("$HOME/guix-test-profile-XX-link") manually. I don't know if there is
>>> any recommended way to do it though.
>>
>> That removes the symlinks to a directory in /var/guix/profiles. I
>> think you also need to remove the links in the latter if you want the
>> garbage collection to work.
>
> 'guix -p $HOME/guix-test-profile' lists only 1 generation (but I did
> create another one and then I rolled-back).
>
> I run 'guix gc' and now I find dangling symlinks in my $HOME.
What dangling symlinks? Just remove them :-)
> One
> symlink is still active (the active generation) which imply that it is
> registered as a GC root.
Look at /var/guix/gcroots/auto/ to see the registered GC roots, but
don't remove them manually, just remove the profile links you created,
then "guix gc" should clean the store from those profiles.
> However, it's not in
> '/usr/local/var/guix/profiles' (I installed from source with the default
> prefix=/usr/local).
this var/guix/profiles is only for system and per-user profiles.
Profiles that you create explicitly (with --profile option) are not
placed there.
> Not sure where to find it.
I'm not sure what you mean: the profiles you created with "guix package
-p $HOME/guix-test-profile -i ..." are in the store and the symlinks to
them are these "$HOME/guix-test-profile[-XXX-link]" links. Simply remove
these links and run "guix gc".
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-14 14:28 ` Alex Kost
@ 2017-03-14 15:18 ` Pjotr Prins
2017-03-16 9:13 ` Alex Kost
0 siblings, 1 reply; 14+ messages in thread
From: Pjotr Prins @ 2017-03-14 15:18 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel, Federico Beffa
On Tue, Mar 14, 2017 at 05:28:52PM +0300, Alex Kost wrote:
> No, "$HOME/guix-test-profile" was not a symlink to
> "/var/guix/profiles/...". Try this:
Hmmm. You are right. ~/.guix-profile, meanwile, does point inside
/var/guix.
I have wondered before how GC works on profiles not in /var/guix.
Where does it store that state? In the database? I mean, if I simply
remove the symlink
lrwxrwxrwx 1 wrk 502 51 Feb 19 09:38 guix-build-system-1-link -> /gnu/store/0lyv2p35ziymd6xjrfxy8sp502n2ii5d-profile
how does Guix know it can GC /gnu/store/0lyv2p35ziymd6xjrfxy8sp502n2ii5d-profile?
Pj.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-14 14:36 ` Alex Kost
@ 2017-03-14 16:43 ` Federico Beffa
2017-03-15 11:09 ` Andy Wingo
2017-03-16 9:13 ` Alex Kost
0 siblings, 2 replies; 14+ messages in thread
From: Federico Beffa @ 2017-03-14 16:43 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> writes:
> Federico Beffa (2017-03-14 09:42 +0100) wrote:
>
>> Pjotr Prins <pjotr.public12@thebird.nl> writes:
>> 'guix -p $HOME/guix-test-profile' lists only 1 generation (but I did
>> create another one and then I rolled-back).
>>
>> I run 'guix gc' and now I find dangling symlinks in my $HOME.
>
> What dangling symlinks? Just remove them :-)
Of this type:
$HOME/guix-test-profile-XXX-link -> /gnu/store/...
Yes, sure, I deleted them. It just seems strange that a GC leaves
dangling links around.
>
>> One
>> symlink is still active (the active generation) which imply that it is
>> registered as a GC root.
>
> Look at /var/guix/gcroots/auto/ to see the registered GC roots, but
> don't remove them manually, just remove the profile links you created,
> then "guix gc" should clean the store from those profiles.
>
>> However, it's not in
>> '/usr/local/var/guix/profiles' (I installed from source with the default
>> prefix=/usr/local).
>
> this var/guix/profiles is only for system and per-user profiles.
> Profiles that you create explicitly (with --profile option) are not
> placed there.
>
>> Not sure where to find it.
>
> I'm not sure what you mean: the profiles you created with "guix package
> -p $HOME/guix-test-profile -i ..." are in the store and the symlinks to
> them are these "$HOME/guix-test-profile[-XXX-link]" links. Simply remove
> these links and run "guix gc".
As Pjotr suggested, I was expecting to have to delete a GC root
somewhere. If this is not the case then the better.
Thanks for the explanation.
Fede
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-14 16:43 ` Federico Beffa
@ 2017-03-15 11:09 ` Andy Wingo
2017-03-15 16:00 ` Ludovic Courtès
2017-03-16 9:13 ` Alex Kost
1 sibling, 1 reply; 14+ messages in thread
From: Andy Wingo @ 2017-03-15 11:09 UTC (permalink / raw)
To: Federico Beffa; +Cc: guix-devel, Alex Kost
On Tue 14 Mar 2017 17:43, Federico Beffa <beffa@ieee.org> writes:
> Alex Kost <alezost@gmail.com> writes:
>
>> Federico Beffa (2017-03-14 09:42 +0100) wrote:
>>
>>> I run 'guix gc' and now I find dangling symlinks in my $HOME.
>>
>> What dangling symlinks? Just remove them :-)
>
> Of this type:
>
> $HOME/guix-test-profile-XXX-link -> /gnu/store/...
>
> Yes, sure, I deleted them. It just seems strange that a GC leaves
> dangling links around.
Currently, profiles that aren't in your ~/.guix-profile are not treated
as GC roots (AFAIR). I think this is a bug -- albeit a known bug. :)
Andy
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-15 11:09 ` Andy Wingo
@ 2017-03-15 16:00 ` Ludovic Courtès
0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2017-03-15 16:00 UTC (permalink / raw)
To: Andy Wingo; +Cc: guix-devel, Alex Kost, Federico Beffa
Andy Wingo <wingo@igalia.com> skribis:
> On Tue 14 Mar 2017 17:43, Federico Beffa <beffa@ieee.org> writes:
>
>> Alex Kost <alezost@gmail.com> writes:
>>
>>> Federico Beffa (2017-03-14 09:42 +0100) wrote:
>>>
>>>> I run 'guix gc' and now I find dangling symlinks in my $HOME.
>>>
>>> What dangling symlinks? Just remove them :-)
>>
>> Of this type:
>>
>> $HOME/guix-test-profile-XXX-link -> /gnu/store/...
>>
>> Yes, sure, I deleted them. It just seems strange that a GC leaves
>> dangling links around.
>
> Currently, profiles that aren't in your ~/.guix-profile are not treated
> as GC roots (AFAIR).
They *are* GC roots (fortunately :-)). If you do “guix package -p foo -i
guile”, you can see a symlink to ‘foo-1-link’ is added to
/var/guix/gcroots/auto.
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-14 16:43 ` Federico Beffa
2017-03-15 11:09 ` Andy Wingo
@ 2017-03-16 9:13 ` Alex Kost
1 sibling, 0 replies; 14+ messages in thread
From: Alex Kost @ 2017-03-16 9:13 UTC (permalink / raw)
To: Federico Beffa; +Cc: guix-devel
Federico Beffa (2017-03-14 17:43 +0100) wrote:
> Alex Kost <alezost@gmail.com> writes:
>
>> Federico Beffa (2017-03-14 09:42 +0100) wrote:
>>
>>> Pjotr Prins <pjotr.public12@thebird.nl> writes:
>>> 'guix -p $HOME/guix-test-profile' lists only 1 generation (but I did
>>> create another one and then I rolled-back).
>>>
>>> I run 'guix gc' and now I find dangling symlinks in my $HOME.
>>
>> What dangling symlinks? Just remove them :-)
>
> Of this type:
>
> $HOME/guix-test-profile-XXX-link -> /gnu/store/...
>
> Yes, sure, I deleted them. It just seems strange that a GC leaves
> dangling links around.
GC can't remove such generation links; it removes only the stuff that is
placed in the store. It's up to a user to remove profiles and their
generations.
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-14 15:18 ` Pjotr Prins
@ 2017-03-16 9:13 ` Alex Kost
2017-03-16 12:18 ` Pjotr Prins
0 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2017-03-16 9:13 UTC (permalink / raw)
To: Pjotr Prins; +Cc: guix-devel
Pjotr Prins (2017-03-14 15:18 +0000) wrote:
> On Tue, Mar 14, 2017 at 05:28:52PM +0300, Alex Kost wrote:
>> No, "$HOME/guix-test-profile" was not a symlink to
>> "/var/guix/profiles/...". Try this:
>
> Hmmm. You are right. ~/.guix-profile, meanwile, does point inside
> /var/guix.
Yes, "~/.guix-profile" is the only "special" profile that uses this
additional level of symlinking. Profiles that you create with "guix
package -p ... -i ..." always point directly to store.
> I have wondered before how GC works on profiles not in /var/guix.
>
> Where does it store that state? In the database?
As Ludovic wrote, the links to the created profile generations are put
in "/var/guix/gcroots/auto" and "guix gc" does not clear the store of
these "registered gc roots".
> I mean, if I simply
> remove the symlink
>
> lrwxrwxrwx 1 wrk 502 51 Feb 19 09:38 guix-build-system-1-link -> /gnu/store/0lyv2p35ziymd6xjrfxy8sp502n2ii5d-profile
>
> how does Guix know it can GC /gnu/store/0lyv2p35ziymd6xjrfxy8sp502n2ii5d-profile?
After you remove "foo-1-link", the according link in
"/var/guix/gcroots/auto" will become dead, so "guix gc" will remove it
and will clear the store of that profile.
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: delete profile
2017-03-16 9:13 ` Alex Kost
@ 2017-03-16 12:18 ` Pjotr Prins
0 siblings, 0 replies; 14+ messages in thread
From: Pjotr Prins @ 2017-03-16 12:18 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Thanks for the explanation :)
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2017-03-16 12:21 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-12 17:28 delete profile Federico Beffa
2017-03-13 19:35 ` Alex Kost
2017-03-14 5:55 ` Pjotr Prins
2017-03-14 8:42 ` Federico Beffa
2017-03-14 14:36 ` Alex Kost
2017-03-14 16:43 ` Federico Beffa
2017-03-15 11:09 ` Andy Wingo
2017-03-15 16:00 ` Ludovic Courtès
2017-03-16 9:13 ` Alex Kost
2017-03-14 14:28 ` Alex Kost
2017-03-14 15:18 ` Pjotr Prins
2017-03-16 9:13 ` Alex Kost
2017-03-16 12:18 ` Pjotr Prins
2017-03-14 13:26 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).