* Newbie user question: How to delete all files in /gnu/store related to a package definition?
@ 2023-02-26 20:12 Rodrigo Morales
2023-02-26 20:34 ` Julien Lepiller
0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Morales @ 2023-02-26 20:12 UTC (permalink / raw)
To: help-guix
Table of Contents
_________________
1. The context
2. The question
1 The context
=============
Inexperienced user here. I'm currently learning how to define my own
packages. I'm using the following package definition to install a
font.
,----
| (define-module (fonts)
| #:use-module (guix packages)
| #:use-module (guix git-download)
| #:use-module (guix gexp)
| #:use-module (guix build-system trivial)
| #:use-module ((guix licenses) #:prefix license:))
|
| (define-public font-noto-color-emoji
| (package
| (name "font-noto-color-emoji")
| (version "2.034")
| (source (origin
| (method git-fetch)
| (uri (git-reference
| (url "https://github.com/googlefonts/noto-emoji")
| (commit (string-append "v" version))))
| (file-name (git-file-name name version))
| (sha256
| (base32
|
"1d6zzk0ii43iqfnjbldwp8sasyx99lbjp1nfgqjla7ixld6yp98l"))))
| (build-system trivial-build-system)
| (arguments
| (list
| #:modules `((guix build utils))
| #:builder
| #~(begin
| (use-modules (guix build utils))
| (let* ((out #$output)
| (font-dir (string-append out "/share/fonts"))
| (truetype-dir (string-append font-dir "/truetype")))
| (chdir (assoc-ref %build-inputs "source"))
| (install-file "fonts/NotoColorEmoji.ttf" truetype-dir)))))
| (home-page "https://github.com/googlefonts/noto-emoji")
| (synopsis "Noto Color Emoji fonts")
| (description "Noto Color Emoji fonts.")
| (license license:silofl1.1)))
`----
I installed that package without no problems.
,----
| guix package -i font-noto-color-emoji
| echo Exit code: $?
`----
,----
| The following package will be installed:
| font-noto-color-emoji 2.034
|
| The following derivation will be built:
| /gnu/store/63y5vvvkmr48cmc17kv6d14miia22z9z-profile.drv
|
| building CA certificate bundle...
| listing Emacs sub-directories...
| building fonts directory...
| generating GdkPixbuf loaders cache...
| generating GLib schema cache...
| creating GTK+ icon theme cache...
| building cache files for GTK+ input methods...
| building directory of Info manuals...
| building XDG desktop file cache...
| building XDG MIME database...
| building profile with 24 packages...
| hint: Consider setting the necessary environment variables by running:
|
| GUIX_PROFILE="/home/rdrg/.guix-profile"
| . "$GUIX_PROFILE/etc/profile"
|
| Alternately, see `guix package --search-paths -p
"/home/rdrg/.guix-profile"'.
| Exit code: 0
`----
I could check that the package was installed by executing the
following command.
,----
| guix package -I font-noto-color-emoji
`----
,----
| font-noto-color-emoji 2.034 out
/gnu/store/b1myag5hg13qs0n3p3l0av2b2v96czi6-font-noto-color-emoji-2.034
`----
I deleted the package.
,----
| guix package -r font-noto-color-emoji
| echo Exit code: $?
`----
,----
|
| The following package will be removed:
| font-noto-color-emoji 2.034
|
| hint: Consider setting the necessary environment variables by running:
|
| GUIX_PROFILE="/home/rdrg/.guix-profile"
| . "$GUIX_PROFILE/etc/profile"
|
| Alternately, see `guix package --search-paths -p
"/home/rdrg/.guix-profile"'.
|
| Exit code: 0
`----
Now, because I've been experimenting with the definition of that
package, there are multiple files that have been created in
`/gnu/store'. See output of the command below.
,----
| find /gnu/store -mindepth 1 -maxdepth 1 -name '*font-noto-color-emoji*'
`----
,----
|
/gnu/store/3m3ifwx0klp2kphx1rmc5qq3z940xbkn-font-noto-color-emoji-2.034.lock
|
/gnu/store/z085zkl49g4pxmd0f7m5izlmlf7429ac-font-noto-color-emoji-2.034-checkout.drv
|
/gnu/store/bvc3bfvdblsz6k28m3d1h16ccgv31r3k-font-noto-color-emoji-2.034-builder
|
/gnu/store/xjrsfz1ca4zphxivmsmz7z7j2xswrrgs-font-noto-color-emoji-2.034.drv
|
/gnu/store/nbp1bp6pabdl0lqd20bxpwalgcpn4dyn-font-noto-color-emoji-2.034-builder
|
/gnu/store/rram8vs20f0g6zmvli19lrrkh0wrrz5z-font-noto-color-emoji-2.034.drv
|
/gnu/store/zka3h8gmvqi9rs16av5xq5b5128kr2v9-font-noto-color-emoji-2.034-builder
|
/gnu/store/7wgb6vhhwdlx3pwaqvvmvha3vkxsj5kl-font-noto-color-emoji-2.034.drv
|
/gnu/store/qxjr48bb5qzh8v16xk94yphyb0ppmxlg-font-noto-color-emoji-2.034-builder
|
/gnu/store/pks5k3gnacyqikb1828qmjks8pb6yvql-font-noto-color-emoji-2.034.drv
|
/gnu/store/zi928lwkgijciyxd9l68k215hd1z5j7p-font-noto-color-emoji-2.034-builder
|
/gnu/store/7wk18cpyy7bpi7v04xi2ygavdlf6rg24-font-noto-color-emoji-2.034.drv
|
/gnu/store/4pjz6gl2aj1sl6zyq8pgxyk9fwf8j9h2-font-noto-color-emoji-2.034-builder
|
/gnu/store/2j9gykgj0axgg193pd6hvrmnzqbz88nm-font-noto-color-emoji-2.034.drv
|
/gnu/store/plarjz5jbvwd2s3cv5pk237bnzkbl0pw-font-noto-color-emoji-2.034-builder
|
/gnu/store/b0b2vzpkxi0i45hvy8c0bs09w20316sw-font-noto-color-emoji-2.034.drv
|
/gnu/store/sjjszsxaklr8wg47r9s76y4ln98h8j97-font-noto-color-emoji-2.034-builder
|
/gnu/store/bg3lg99617f8clzjba0z9r15q1305wsr-font-noto-color-emoji-2.034.drv
|
/gnu/store/y2vzwjpyafar83ag15p9g2j121nczlvy-font-noto-color-emoji-2.034-builder
|
/gnu/store/kv26z95lf2qxn4h6bq5q169fmxadrw8q-font-noto-color-emoji-2.034.drv
|
/gnu/store/s9slj9j198gfx3kqp1zkcqhfcyg14rap-font-noto-color-emoji-2-2.034-checkout.drv
|
/gnu/store/8lgzq20azwhfisxv10y3k9ims26hnc3r-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/aipvm0x05a137hard114kx4bsrq87ahq-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/399x8r112szia15ila5ncwgx7my515bj-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/nx1q95fz8b8y20agmr5jjwv6144k3w7x-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/wirjgrz2s8b34gwy0nkq4whlyjwy9zq3-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/yspy26259vk78k3glh3qnl7i99jixnf6-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/7kdwg0dhckbjr9fw80535waa12qyrdzj-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/vafk3k8za8llvr868v98c63kn0m9c4c4-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/jlmah8rvjrwsasnpvbp81g1dhq7sb5ng-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/r5yp65w0456dqcx3qf3ssf2llfrivy1r-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/mwjh47r3c9bl3hjk03k5c6nmj4kqaf3k-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/dmwyzd77yc2gnnisxfkzaknasj3pr0m1-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/j135a8rxcjf9g35kcylxas7ryqw2qlpw-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/av15fkq561hbdb01010cscj21lgyw9vz-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/6pymy4sik5ywmnbfk94hx0hccpm170ql-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/3w6j2vcj5cxzk7fbcp79gspkj32x28g6-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/rm4m88y98abfy5jnm7y4kdyyw42qszxl-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/3ig8j3nrdvyx6insxnjrbdb8r2lx5bg3-font-noto-color-emoji-2-2.034.drv
|
/gnu/store/laa1q5k6a9kkganmwjpddw9kj6nygd8m-font-noto-color-emoji-2-2.034-builder
|
/gnu/store/mlgjqk1xk7wmszs3qiak0ry1nzpd9kc9-font-noto-color-emoji-2-2.034.drv
| /gnu/store/b1myag5hg13qs0n3p3l0av2b2v96czi6-font-noto-color-emoji-2.034
| /gnu/store/3m3ifwx0klp2kphx1rmc5qq3z940xbkn-font-noto-color-emoji-2.034
| /gnu/store/r4223f33vb2qw6mhgvlw9g8ghm3w9pq1-font-noto-color-emoji-2.034
| /gnu/store/l7sf97435054lp5y8hcg6z8jydkm5x0k-font-noto-color-emoji-2.034
| /gnu/store/jfjz40xprqh70rvii0mbnyfkxvy4sdq9-font-noto-color-emoji-2.034
| /gnu/store/z6abnxrz1wj941r80438q8m99jchq2z4-font-noto-color-emoji-2.034
| /gnu/store/i5iw608yfyk9slf9di1y2c1cwyx61i5b-font-noto-color-emoji-2.034
| /gnu/store/k6xllqgmb9s6bvi3194rgg7gr5cqlczr-font-noto-color-emoji-2.034
| /gnu/store/mcm7nz5k8qihcn89c11qc114cvm0v3cy-font-noto-color-emoji-2.034
|
/gnu/store/c32blyvc9knxmr3fn4wlz26d2sfgs6fh-font-noto-color-emoji-2-2.034-checkout
|
/gnu/store/kqh995j2wjxh0mmay1np9pvvjfmsa9n2-font-noto-color-emoji-2.034-checkout
|
/gnu/store/nfw0336absmbrmy33f4mzrx3kbxhmv8v-font-noto-color-emoji-2-2.034
|
/gnu/store/h2v3ffvjhn5smxir394kjyqg8w5mh4qb-font-noto-color-emoji-2-2.034
|
/gnu/store/3al3v0ckyn82rz38rs68mqg8z3b963wz-font-noto-color-emoji-2-2.034
`----
2 The question
==============
How should I remove all those directories in /gnu/store that are
related with `font-noto-color-emoji'? I want to delete them because I
want to continue experimenting and I want to make sure that none of
those files or directories are interferring with my experimentation in
any way. I've tried executing the following command, but I get the
following error.
,----
| find /gnu/store -mindepth 1 -maxdepth 1 -name '*font-noto-color-emoji*'
| xargs guix gc -D
| echo Exit code: $?
`----
,----
| finding garbage collector roots...
| guix gc: error: cannot delete path
`/gnu/store/2j9gykgj0axgg193pd6hvrmnzqbz88nm-font-noto-color-emoji-2.034.drv'
since it is still alive
| Exit code: 123
`----
Again, I need to delete those files, because I want to learn more
about Guix and continue experimenting, so I want to install the
package as if it had never been installed in my system. I suppose that
some files from previous installations are reused, I don't want this
to occur, that's why I want to delete them.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Newbie user question: How to delete all files in /gnu/store related to a package definition?
2023-02-26 20:12 Newbie user question: How to delete all files in /gnu/store related to a package definition? Rodrigo Morales
@ 2023-02-26 20:34 ` Julien Lepiller
0 siblings, 0 replies; 2+ messages in thread
From: Julien Lepiller @ 2023-02-26 20:34 UTC (permalink / raw)
To: Rodrigo Morales; +Cc: help-guix
Hi Rodrigo,
> ,----
> | finding garbage collector roots...
> | guix gc: error: cannot delete path
> `/gnu/store/2j9gykgj0axgg193pd6hvrmnzqbz88nm-font-noto-color-emoji-2.034.drv'
> since it is still alive
> | Exit code: 123
> `----
As it says, that store path is still alive, but why?
When you install a package, remove a package, or do anything in your
user profile, guix will create a new "generation" of the profile that
contains the same items as the previous generation, except for what you
asked it to do. So when removing a package with `guix remove foo`, you
cerate a new generation of the profile, where package "foo" is not
present.
Old generations of your profile are considered live, and are protected
against garbage collection, so you can roll back to them easily in case
something goes wrong with the new generation.
Try this:
guix package --roll-back
Now, you should be able to use your font again!
You can list the generations with
guix package --list-generations
and go back to the most recent one with
guix package --switch-generation=<n> where <n> is the generation number
given in the previous command.
You can also remove old generations of your profile, for instance, all
but the current one:
guix package --delete-generations
and then, you should be able to collect that store path :)
HTH!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-26 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-26 20:12 Newbie user question: How to delete all files in /gnu/store related to a package definition? Rodrigo Morales
2023-02-26 20:34 ` Julien Lepiller
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.