Subject: [bug#62062] [PATCH] guix: Strip #:use-module lists.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 9 Mar 2023 00:26:24 +0100

This was obtained by setting up this environment:

  guix shell -D guix --with-input=[email-masked]=guile-next \
    --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2
    -- make -j5

then adding 'unused-module' to (@@ (guix build compiler) %warnings),
building, and checking all the "unused module" warnings and removing
those that were definitely unused.
---
 guix/android-repo-download.scm           |  3 ---
 guix/base32.scm                          |  1 -
 guix/build-system/android-ndk.scm        |  2 --
 guix/build-system/ant.scm                |  2 --
 guix/build-system/asdf.scm               |  2 --
 guix/build-system/chicken.scm            |  1 -
 guix/build-system/clojure.scm            |  2 --
 guix/build-system/cmake.scm              |  2 --
 guix/build-system/copy.scm               |  1 -
 guix/build-system/dub.scm                |  2 --
 guix/build-system/dune.scm               |  2 --
 guix/build-system/emacs.scm              |  2 --
 guix/build-system/font.scm               |  1 -
 guix/build-system/glib-or-gtk.scm        |  2 --
 guix/build-system/gnu.scm                |  1 -
 guix/build-system/guile.scm              |  1 -
 guix/build-system/haskell.scm            |  1 -
 guix/build-system/julia.scm              |  2 --
 guix/build-system/maven.scm              |  1 -
 guix/build-system/meson.scm              |  1 -
 guix/build-system/minify.scm             |  2 --
 guix/build-system/node.scm               |  1 -
 guix/build-system/ocaml.scm              |  1 -
 guix/build-system/perl.scm               |  2 --
 guix/build-system/pyproject.scm          |  4 ----
 guix/build-system/python.scm             |  3 ---
 guix/build-system/qt.scm                 |  1 -
 guix/build-system/r.scm                  |  1 -
 guix/build-system/rakudo.scm             |  1 -
 guix/build-system/rebar.scm              |  2 --
 guix/build-system/renpy.scm              |  3 ---
 guix/build-system/ruby.scm               |  2 --
 guix/build-system/scons.scm              |  1 -
 guix/build-system/texlive.scm            |  1 -
 guix/build-system/trivial.scm            |  2 --
 guix/build-system/waf.scm                |  3 ---
 guix/build/android-ndk-build-system.scm  |  5 -----
 guix/build/asdf-build-system.scm         |  4 ----
 guix/build/chicken-build-system.scm      |  1 -
 guix/build/clojure-utils.scm             |  1 -
 guix/build/download-nar.scm              |  1 -
 guix/build/elm-build-system.scm          |  1 -
 guix/build/guile-build-system.scm        |  1 +
 guix/build/linux-module-build-system.scm |  4 ----
 guix/build/lisp-utils.scm                |  2 --
 guix/build/make-bootstrap.scm            |  3 ---
 guix/build/svn.scm                       |  1 -
 guix/build/waf-build-system.scm          |  4 ----
 guix/channels.scm                        |  4 ----
 guix/derivations.scm                     |  2 --
 guix/discovery.scm                       |  1 -
 guix/ftp-client.scm                      |  2 --
 guix/git-authenticate.scm                |  1 -
 guix/git.scm                             |  2 --
 guix/gnu-maintenance.scm                 |  3 ---
 guix/graph.scm                           |  1 -
 guix/hg-download.scm                     |  1 -
 guix/import/cabal.scm                    |  1 -
 guix/import/cpan.scm                     |  2 +-
 guix/import/cran.scm                     |  4 ----
 guix/import/crate.scm                    |  3 ---
 guix/import/egg.scm                      |  4 ----
 guix/import/elm.scm                      | 11 -----------
 guix/import/elpa.scm                     |  5 +----
 guix/import/gem.scm                      |  1 -
 guix/import/git.scm                      |  5 +----
 guix/import/github.scm                   |  2 --
 guix/import/gnome.scm                    |  2 --
 guix/import/gnu.scm                      |  3 ---
 guix/import/go.scm                       |  8 --------
 guix/import/hexpm.scm                    |  9 ---------
 guix/import/kde.scm                      |  1 -
 guix/import/minetest.scm                 |  7 -------
 guix/import/opam.scm                     |  7 +------
 guix/import/print.scm                    |  3 +--
 guix/import/pypi.scm                     |  3 ---
 guix/import/test.scm                     |  2 --
 guix/import/texlive.scm                  |  3 ---
 guix/import/utils.scm                    |  1 -
 guix/ipfs.scm                            |  5 -----
 guix/lint.scm                            |  1 -
 guix/pki.scm                             |  1 -
 guix/records.scm                         |  1 -
 guix/remote.scm                          |  2 --
 guix/scripts.scm                         |  1 -
 guix/scripts/archive.scm                 |  1 -
 guix/scripts/build.scm                   |  3 ---
 guix/scripts/challenge.scm               |  1 -
 guix/scripts/deploy.scm                  |  1 -
 guix/scripts/discover.scm                |  1 -
 guix/scripts/download.scm                |  3 ---
 guix/scripts/edit.scm                    |  3 ++-
 guix/scripts/graph.scm                   |  1 -
 guix/scripts/hash.scm                    |  4 ----
 guix/scripts/home.scm                    |  2 --
 guix/scripts/import.scm                  |  3 ---
 guix/scripts/offload.scm                 |  1 -
 guix/scripts/pack.scm                    |  2 --
 guix/scripts/package.scm                 |  5 -----
 guix/scripts/publish.scm                 |  4 ----
 guix/scripts/pull.scm                    |  2 --
 guix/scripts/refresh.scm                 |  3 ---
 guix/scripts/repl.scm                    |  2 --
 guix/scripts/search.scm                  |  1 -
 guix/scripts/show.scm                    |  1 -
 guix/scripts/style.scm                   |  2 --
 guix/scripts/substitute.scm              |  4 ----
 guix/scripts/system.scm                  |  7 -------
 guix/scripts/time-machine.scm            |  1 -
 guix/self.scm                            |  1 -
 guix/serialization.scm                   |  1 -
 guix/status.scm                          |  1 -
 guix/store.scm                           |  2 --
 guix/store/database.scm                  |  2 --
 guix/store/deduplication.scm             |  2 --
 guix/substitutes.scm                     |  9 ---------
 guix/tests/gnupg.scm                     |  1 -
 guix/tests/http.scm                      |  1 -
 guix/upstream.scm                        |  1 -
 guix/utils.scm                           |  3 ---
 120 files changed, 8 insertions(+), 279 deletions(-)

diff --git a/guix/android-repo-download.scm b/guix/android-repo-download.scm
index 1c3502e673..e224cdd295 100644
--- a/guix/android-repo-download.scm
+++ b/guix/android-repo-download.scm
@@ -29,10 +29,7 @@ (define-module (guix android-repo-download)
   #:use-module (guix modules)
   #:autoload   (guix build-system gnu) (standard-packages)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 vlist)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-34)
-  #:use-module (srfi srfi-35)
   #:export (android-repo-reference
             android-repo-reference?
             android-repo-reference-manifest-url
diff --git a/guix/base32.scm b/guix/base32.scm
index 8f097d4e77..dd18a796f2 100644
--- a/guix/base32.scm
+++ b/guix/base32.scm
@@ -17,7 +17,6 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix base32)
-  #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
   #:use-module (srfi srfi-60)
diff --git a/guix/build-system/android-ndk.scm b/guix/build-system/android-ndk.scm
index 211fd11311..047f884b19 100644
--- a/guix/build-system/android-ndk.scm
+++ b/guix/build-system/android-ndk.scm
@@ -26,8 +26,6 @@ (define-module (guix build-system android-ndk)
   #:use-module (guix packages)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (android-ndk-build-system))
 
 (define %android-ndk-build-system-modules
diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm
index 08a4c996f9..cfb033f6a5 100644
--- a/guix/build-system/ant.scm
+++ b/guix/build-system/ant.scm
@@ -26,8 +26,6 @@ (define-module (guix build-system ant)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (%ant-build-system-modules
             ant-build
             ant-build-system))
diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 74a3e47da1..2b17cee37b 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -33,9 +33,7 @@ (define-module (guix build-system asdf)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:use-module (gnu packages)
   #:export (%asdf-build-system-modules
             %asdf-build-modules
diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm
index 07666d1321..9f518e66e6 100644
--- a/guix/build-system/chicken.scm
+++ b/guix/build-system/chicken.scm
@@ -27,7 +27,6 @@ (define-module (guix build-system chicken)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:export (%chicken-build-system-modules
             chicken-build
             chicken-build-system
diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm
index 2a0713d297..fb897356bc 100644
--- a/guix/build-system/clojure.scm
+++ b/guix/build-system/clojure.scm
@@ -33,8 +33,6 @@ (define-module (guix build-system clojure)
                 #:select
                 ((search-path-specification->sexp . search-path-spec->sexp)))
   #:use-module (guix utils)
-
-  #:use-module (ice-9 match)
   #:export (%clojure-build-system-modules
             clojure-build
             clojure-build-system))
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index 0aabc95b90..09e3ac85db 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -24,12 +24,10 @@ (define-module (guix build-system cmake)
   #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix monads)
-  #:use-module (guix derivations)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:export (%cmake-build-system-modules
             cmake-build
             cmake-build-system))
diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
index 6efc2b2766..4091eb7847 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -28,7 +28,6 @@ (define-module (guix build-system copy)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:export (%copy-build-system-modules
             default-glibc
diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm
index 8aa93d5b0f..b4011cdb83 100644
--- a/guix/build-system/dub.scm
+++ b/guix/build-system/dub.scm
@@ -29,8 +29,6 @@ (define-module (guix build-system dub)
   #:use-module (guix packages)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (dub-build-system))
 
 (define (default-ldc)
diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index 3f81d21441..afe5b24f22 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -25,10 +25,8 @@ (define-module (guix build-system dune)
   #:use-module (guix gexp)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
-  #:use-module ((guix build-system gnu) #:prefix gnu:)
   #:use-module ((guix build-system ocaml) #:prefix ocaml:)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:export (%dune-build-system-modules
             dune-build
diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 3df68789ff..ebf97a5344 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -28,8 +28,6 @@ (define-module (guix build-system emacs)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (%emacs-build-system-modules
             emacs-build
             emacs-build-system)
diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index a99f76c66b..aac130da4e 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -22,7 +22,6 @@ (define-module (guix build-system font)
   #:use-module (guix monads)
   #:use-module (guix utils)
   #:use-module (guix packages)
-  #:use-module (guix derivations)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index aa9703829b..e956354687 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -24,14 +24,12 @@ (define-module (guix build-system glib-or-gtk)
   #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (guix monads)
-  #:use-module (guix derivations)
   #:use-module (guix search-paths)
   #:use-module ((guix build glib-or-gtk-build-system)
                 #:select (%gdk-pixbuf-loaders-cache-file))
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:export (%glib-or-gtk-build-system-modules
             glib-or-gtk-build
             glib-or-gtk-cross-build
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index e62ee18367..c363c3910f 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -22,7 +22,6 @@ (define-module (guix build-system gnu)
   #:use-module (guix memoization)
   #:use-module (guix gexp)
   #:use-module (guix monads)
-  #:use-module (guix derivations)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix packages)
diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm
index 7e2e33c13e..1bd292e267 100644
--- a/guix/build-system/guile.scm
+++ b/guix/build-system/guile.scm
@@ -25,7 +25,6 @@ (define-module (guix build-system guile)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
   #:use-module (srfi srfi-26)
   #:export (%guile-build-system-modules
             guile-build-system))
diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm
index a37b3a938c..b8858421c2 100644
--- a/guix/build-system/haskell.scm
+++ b/guix/build-system/haskell.scm
@@ -32,7 +32,6 @@ (define-module (guix build-system haskell)
   #:use-module (guix build-system gnu)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:export (hackage-uri
 
             %haskell-build-system-modules
diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm
index 66e7711bcd..b5521e38e4 100644
--- a/guix/build-system/julia.scm
+++ b/guix/build-system/julia.scm
@@ -29,8 +29,6 @@ (define-module (guix build-system julia)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (%julia-build-system-modules
             julia-build
             julia-build-system))
diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm
index 0af5922692..3daff07323 100644
--- a/guix/build-system/maven.scm
+++ b/guix/build-system/maven.scm
@@ -26,7 +26,6 @@ (define-module (guix build-system maven)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:export (%maven-build-system-modules
             default-maven
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index 7d413a991d..d7d807f5b6 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -30,7 +30,6 @@ (define-module (guix build-system meson)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:export (%meson-build-system-modules
             meson-build-system
             make-cross-file))
diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 7d4745ab32..787235deeb 100644
--- a/guix/build-system/minify.scm
+++ b/guix/build-system/minify.scm
@@ -26,8 +26,6 @@ (define-module (guix build-system minify)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (%minify-build-system-modules
             minify-build
             minify-build-system))
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 24bd677bfc..3f73390809 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -29,7 +29,6 @@ (define-module (guix build-system node)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
   #:export (%node-build-system-modules
             node-build
             node-build-system))
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 921c1f8629..27d5183640 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -25,7 +25,6 @@ (define-module (guix build-system ocaml)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:export (%ocaml-build-system-modules
             package-with-ocaml4.07
diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm
index 43ec2fdcb6..7c6deb34bf 100644
--- a/guix/build-system/perl.scm
+++ b/guix/build-system/perl.scm
@@ -22,12 +22,10 @@ (define-module (guix build-system perl)
   #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (guix monads)
-  #:use-module (guix derivations)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:export (%perl-build-system-modules
             perl-build
             perl-cross-build
diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.scm
index 8f3b562ca3..44d6650ba9 100644
--- a/guix/build-system/pyproject.scm
+++ b/guix/build-system/pyproject.scm
@@ -22,18 +22,14 @@ (define-module (guix build-system pyproject)
   #:use-module (guix gexp)
   #:use-module (guix store)
   #:use-module (guix utils)
-  #:use-module (guix memoization)
   #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (guix packages)
-  #:use-module (guix derivations)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
-  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:export (%pyproject-build-system-modules
             default-python
             pyproject-build
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index c8f04b2298..cca009fb28 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -24,7 +24,6 @@ (define-module (guix build-system python)
   #:use-module (guix gexp)
   #:use-module (guix store)
   #:use-module (guix utils)
-  #:use-module (guix memoization)
   #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (guix packages)
@@ -32,9 +31,7 @@ (define-module (guix build-system python)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:export (%python-build-system-modules
             package-with-python2
             strip-python2-variant
diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index 7e3a54f1f8..cb33212abd 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -33,7 +33,6 @@ (define-module (guix build-system qt)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:export (%qt-build-system-modules
             qt-build
             qt-build-system))
diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index 9b360ae581..708b9e18fe 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -27,7 +27,6 @@ (define-module (guix build-system r)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (%r-build-system-modules
             r-build
             r-build-system
diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm
index 05a4d9c2ad..3b30fdfd0e 100644
--- a/guix/build-system/rakudo.scm
+++ b/guix/build-system/rakudo.scm
@@ -26,7 +26,6 @@ (define-module (guix build-system rakudo)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
-  #:use-module (ice-9 match)
   #:export (%rakudo-build-system-modules
             rakudo-build
             rakudo-build-system))
diff --git a/guix/build-system/rebar.scm b/guix/build-system/rebar.scm
index 6ca5abe4d6..de1294ec3f 100644
--- a/guix/build-system/rebar.scm
+++ b/guix/build-system/rebar.scm
@@ -26,8 +26,6 @@ (define-module (guix build-system rebar)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (hexpm-uri
             hexpm-package-url
             %rebar-build-system-modules
diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm
index f1070951ee..3039e3c63b 100644
--- a/guix/build-system/renpy.scm
+++ b/guix/build-system/renpy.scm
@@ -21,16 +21,13 @@
 (define-module (guix build-system renpy)
   #:use-module (guix store)
   #:use-module (guix utils)
-  #:use-module (guix memoization)
   #:use-module (guix packages)
   #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:export (%renpy-build-system-modules
             default-renpy
             renpy-build
diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index 0aa273b4f4..a3793a9381 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -23,11 +23,9 @@ (define-module (guix build-system ruby)
   #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (guix packages)
-  #:use-module (guix derivations)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
   #:export (rubygems-uri
             %ruby-build-system-modules
             ruby-build
diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm
index 9af24d40f8..046ddef740 100644
--- a/guix/build-system/scons.scm
+++ b/guix/build-system/scons.scm
@@ -25,7 +25,6 @@ (define-module (guix build-system scons)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module (ice-9 match)
   #:export (%scons-build-system-modules
             scons-build
             scons-build-system))
diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
index 336e192d83..d970c1beb9 100644
--- a/guix/build-system/texlive.scm
+++ b/guix/build-system/texlive.scm
@@ -28,7 +28,6 @@ (define-module (guix build-system texlive)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module (guix svn-download)
-  #:use-module (ice-9 match)
   #:export (%texlive-build-system-modules
             texlive-build
             texlive-build-system
diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm
index 378ae481b9..e08884baf1 100644
--- a/guix/build-system/trivial.scm
+++ b/guix/build-system/trivial.scm
@@ -18,12 +18,10 @@
 
 (define-module (guix build-system trivial)
   #:use-module (guix store)
-  #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (guix packages)
   #:use-module (guix build-system)
-  #:use-module (ice-9 match)
   #:export (trivial-build-system))
 
 (define* (lower name
diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm
index 1d520050f6..91b3d0d100 100644
--- a/guix/build-system/waf.scm
+++ b/guix/build-system/waf.scm
@@ -22,14 +22,11 @@ (define-module (guix build-system waf)
   #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (guix packages)
-  #:use-module (guix derivations)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
   #:use-module ((guix build-system python)
                 #:select (default-python default-python2))
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-26)
   #:export (%waf-build-system-modules
             waf-build
             waf-build-system))
diff --git a/guix/build/android-ndk-build-system.scm b/guix/build/android-ndk-build-system.scm
index 3c8f726d1d..0298292ac9 100644
--- a/guix/build/android-ndk-build-system.scm
+++ b/guix/build/android-ndk-build-system.scm
@@ -18,14 +18,9 @@
 
 (define-module (guix build android-ndk-build-system)
   #:use-module ((guix build gnu-build-system) #:prefix gnu:)
-  #:use-module (guix build syscalls)
   #:use-module (guix build utils)
-  #:use-module (ice-9 popen)
-  #:use-module (ice-9 rdelim)
-  #:use-module (ice-9 ftw)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
-  #:use-module (rnrs io ports)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:export (%standard-phases
diff --git a/guix/build/asdf-build-system.scm b/guix/build/asdf-build-system.scm
index 92154e7d34..a47e825439 100644
--- a/guix/build/asdf-build-system.scm
+++ b/guix/build/asdf-build-system.scm
@@ -24,11 +24,7 @@ (define-module (guix build asdf-build-system)
   #:use-module (guix build union)
   #:use-module (guix build lisp-utils)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
-  #:use-module (ice-9 rdelim)
-  #:use-module (ice-9 receive)
-  #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
   #:use-module (ice-9 ftw)
diff --git a/guix/build/chicken-build-system.scm b/guix/build/chicken-build-system.scm
index a669822dad..8f9f59cc25 100644
--- a/guix/build/chicken-build-system.scm
+++ b/guix/build/chicken-build-system.scm
@@ -18,7 +18,6 @@
 
 (define-module (guix build chicken-build-system)
   #:use-module ((guix build gnu-build-system) #:prefix gnu:)
-  #:use-module (guix build union)
   #:use-module (guix build utils)
   #:use-module (ice-9 match)
   #:use-module (ice-9 ftw)
diff --git a/guix/build/clojure-utils.scm b/guix/build/clojure-utils.scm
index c5322141d3..57081d30f7 100644
--- a/guix/build/clojure-utils.scm
+++ b/guix/build/clojure-utils.scm
@@ -20,7 +20,6 @@ (define-module (guix build clojure-utils)
   #:use-module (guix build utils)
   #:use-module (ice-9 ftw)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-8)
   #:use-module (srfi srfi-26)
diff --git a/guix/build/download-nar.scm b/guix/build/download-nar.scm
index 867f3c10bb..d760f3ce00 100644
--- a/guix/build/download-nar.scm
+++ b/guix/build/download-nar.scm
@@ -18,7 +18,6 @@
 
 (define-module (guix build download-nar)
   #:use-module (guix build download)
-  #:use-module (guix build utils)
   #:use-module ((guix serialization) #:hide (dump-port*))
   #:autoload   (zlib) (call-with-gzip-input-port)
   #:use-module (guix progress)
diff --git a/guix/build/elm-build-system.scm b/guix/build/elm-build-system.scm
index 02d7c029dd..87a426e2a9 100644
--- a/guix/build/elm-build-system.scm
+++ b/guix/build/elm-build-system.scm
@@ -23,7 +23,6 @@ (define-module (guix build elm-build-system)
   #:use-module (guix build union)
   #:use-module (ice-9 ftw)
   #:use-module (ice-9 rdelim)
-  #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
   #:use-module (ice-9 popen)
   #:use-module (ice-9 vlist)
diff --git a/guix/build/guile-build-system.scm b/guix/build/guile-build-system.scm
index 32a431d347..a293b3f624 100644
--- a/guix/build/guile-build-system.scm
+++ b/guix/build/guile-build-system.scm
@@ -26,6 +26,7 @@ (define-module (guix build guile-build-system)
   #:use-module (ice-9 rdelim)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 format)
+  #:autoload   (ice-9 threads) (current-processor-count)
   #:use-module (guix build utils)
   #:export (target-guile-effective-version
             %standard-phases
diff --git a/guix/build/linux-module-build-system.scm b/guix/build/linux-module-build-system.scm
index 18ccf7cd8b..b93c5eaf93 100644
--- a/guix/build/linux-module-build-system.scm
+++ b/guix/build/linux-module-build-system.scm
@@ -21,10 +21,6 @@
 (define-module (guix build linux-module-build-system)
   #:use-module ((guix build gnu-build-system) #:prefix gnu:)
   #:use-module (guix build utils)
-  #:use-module (ice-9 ftw)
-  #:use-module (ice-9 match)
-  #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:export (%standard-phases
             linux-module-build))
 
diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm
index 646d4a3365..2ebd4bec9b 100644
--- a/guix/build/lisp-utils.scm
+++ b/guix/build/lisp-utils.scm
@@ -20,11 +20,9 @@
 
 (define-module (guix build lisp-utils)
   #:use-module (ice-9 format)
-  #:use-module (ice-9 hash-table)
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:use-module (guix build utils)
   #:export (%lisp
             %lisp-type
diff --git a/guix/build/make-bootstrap.scm b/guix/build/make-bootstrap.scm
index 0d29338ce3..ffa8de175c 100644
--- a/guix/build/make-bootstrap.scm
+++ b/guix/build/make-bootstrap.scm
@@ -20,9 +20,6 @@
 
 (define-module (guix build make-bootstrap)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
-  #:use-module (srfi srfi-19)
-  #:use-module (srfi srfi-26)
   #:use-module (guix build utils)
   #:export (copy-linux-headers
             make-stripped-libc))
diff --git a/guix/build/svn.scm b/guix/build/svn.scm
index 44d77a968f..2d960cb364 100644
--- a/guix/build/svn.scm
+++ b/guix/build/svn.scm
@@ -22,7 +22,6 @@
 (define-module (guix build svn)
   #:use-module (guix build utils)
   #:use-module (srfi srfi-34)
-  #:use-module (ice-9 format)
   #:export (svn-fetch))
 
 ;;; Commentary:
diff --git a/guix/build/waf-build-system.scm b/guix/build/waf-build-system.scm
index 56048e7685..63791ee6ed 100644
--- a/guix/build/waf-build-system.scm
+++ b/guix/build/waf-build-system.scm
@@ -19,10 +19,6 @@
 (define-module (guix build waf-build-system)
   #:use-module ((guix build gnu-build-system) #:prefix gnu:)
   #:use-module (guix build utils)
-  #:use-module (ice-9 match)
-  #:use-module (ice-9 ftw)
-  #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:export (%standard-phases
             waf-build))
 
diff --git a/guix/channels.scm b/guix/channels.scm
index d44e7a0a3a..1ff72b7e72 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -29,8 +29,6 @@ (define-module (guix channels)
   #:use-module (guix base16)
   #:use-module (guix records)
   #:use-module (guix gexp)
-  #:use-module (guix modules)
-  #:use-module (guix discovery)
   #:use-module (guix monads)
   #:use-module (guix profiles)
   #:use-module (guix packages)
@@ -55,8 +53,6 @@ (define-module (guix channels)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 vlist)
-  #:use-module ((ice-9 rdelim) #:select (read-string))
-  #:use-module ((rnrs bytevectors) #:select (bytevector=?))
   #:export (channel
             channel?
             channel-name
diff --git a/guix/derivations.scm b/guix/derivations.scm
index 0bb6a28147..9fec7f4f0b 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -41,8 +41,6 @@ (define-module (guix derivations)
   #:use-module (guix i18n)
   #:use-module (guix monads)
   #:use-module (gcrypt hash)
-  #:use-module (guix base32)
-  #:use-module (guix records)
   #:use-module (guix sets)
   #:export (<derivation>
             derivation?
diff --git a/guix/discovery.scm b/guix/discovery.scm
index 81d4ca600f..0edc7fd1ae 100644
--- a/guix/discovery.scm
+++ b/guix/discovery.scm
@@ -24,7 +24,6 @@ (define-module (guix discovery)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
   #:use-module (ice-9 vlist)
-  #:use-module (ice-9 ftw)
   #:export (scheme-files
             scheme-modules
             scheme-modules*
diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm
index 9cc34cc7ec..c1d99bd75f 100644
--- a/guix/ftp-client.scm
+++ b/guix/ftp-client.scm
@@ -20,10 +20,8 @@ (define-module (guix ftp-client)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-11)
-  #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-31)
   #:use-module (ice-9 binary-ports)
-  #:use-module (rnrs bytevectors)
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 rdelim)
diff --git a/guix/git-authenticate.scm b/guix/git-authenticate.scm
index 419cb85afc..37c69d0880 100644
--- a/guix/git-authenticate.scm
+++ b/guix/git-authenticate.scm
@@ -35,7 +35,6 @@ (define-module (guix git-authenticate)
   #:use-module (guix progress)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
-  #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
   #:use-module (rnrs bytevectors)
diff --git a/guix/git.scm b/guix/git.scm
index 4019323327..be20cde019 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -23,8 +23,6 @@
 
 (define-module (guix git)
   #:use-module (git)
-  #:use-module (git object)
-  #:use-module (git submodule)
   #:use-module (guix i18n)
   #:use-module (guix base32)
   #:use-module (guix cache)
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 0aa70243b5..32712f7218 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -23,15 +23,12 @@ (define-module (guix gnu-maintenance)
   #:use-module (web uri)
   #:use-module (web client)
   #:use-module (web response)
-  #:use-module (sxml simple)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
-  #:use-module (srfi srfi-34)
   #:use-module (rnrs io ports)
-  #:use-module (system foreign)
   #:use-module ((guix http-client) #:hide (open-socket-for-uri))
   ;; not required in many cases, so autoloaded to reduce start-up costs.
   #:autoload   (guix download) (%mirrors)
diff --git a/guix/graph.scm b/guix/graph.scm
index 41219ab67d..aee0021d6c 100644
--- a/guix/graph.scm
+++ b/guix/graph.scm
@@ -24,7 +24,6 @@ (define-module (guix graph)
   #:use-module (guix sets)
   #:autoload   (guix diagnostics) (formatted-message)
   #:autoload   (guix i18n) (G_)
-  #:use-module (rnrs io ports)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-26)
diff --git a/guix/hg-download.scm b/guix/hg-download.scm
index 382c34922a..a7022dd431 100644
--- a/guix/hg-download.scm
+++ b/guix/hg-download.scm
@@ -25,7 +25,6 @@ (define-module (guix hg-download)
   #:use-module (guix records)
   #:use-module (guix modules)
   #:use-module (guix packages)
-  #:autoload   (guix build-system gnu) (standard-packages)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
   #:use-module (ice-9 match)
diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm
index 4410c12500..fe03c30254 100644
--- a/guix/import/cabal.scm
+++ b/guix/import/cabal.scm
@@ -22,7 +22,6 @@ (define-module (guix import cabal)
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 rdelim)
-  #:use-module (ice-9 receive)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 8972b87080..eeb142a9b8 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -31,10 +31,10 @@ (define-module (guix import cpan)
   #:use-module (json)
   #:use-module (gcrypt hash)
   #:use-module (guix diagnostics)
+  #:use-module (guix i18n)
   #:use-module (guix store)
   #:use-module (guix utils)
   #:use-module (guix base32)
-  #:use-module (guix ui)
   #:use-module ((guix download) #:select (download-to-store url-fetch))
   #:use-module ((guix import utils) #:select (factorize-uri))
   #:use-module (guix import json)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 17c19a2dcf..210cb40ec7 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -29,12 +29,10 @@ (define-module (guix import cran)
   #:use-module ((ice-9 rdelim) #:select (read-string read-line))
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-2)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
   #:use-module (srfi srfi-71)
-  #:use-module (ice-9 receive)
   #:use-module (web uri)
   #:use-module (guix memoization)
   #:use-module (guix http-client)
@@ -52,11 +50,9 @@ (define-module (guix import cran)
   #:use-module (guix utils)
   #:use-module (guix git)
   #:use-module ((guix build-system r) #:select (cran-uri bioconductor-uri))
-  #:use-module (guix ui)
   #:use-module (guix upstream)
   #:use-module (guix packages)
   #:use-module (guix sets)
-  #:use-module (gnu packages)
   #:export (%input-style
 
             cran->guix-package
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index c17d96ef41..514eca2229 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -23,14 +23,11 @@
 (define-module (guix import crate)
   #:use-module (guix base32)
   #:use-module (guix build-system cargo)
-  #:use-module ((guix download) #:prefix download:)
   #:use-module (gcrypt hash)
   #:use-module (guix http-client)
   #:use-module (guix import json)
   #:use-module (guix import utils)
-  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix memoization)
-  #:use-module (guix monads)
   #:use-module (guix packages)
   #:use-module (guix upstream)
   #:use-module (guix utils)
diff --git a/guix/import/egg.scm b/guix/import/egg.scm
index 90d97909b5..e3bc158475 100644
--- a/guix/import/egg.scm
+++ b/guix/import/egg.scm
@@ -26,18 +26,14 @@ (define-module (guix import egg)
   #:use-module (srfi srfi-71)
   #:use-module (gcrypt hash)
   #:use-module (guix git)
-  #:use-module (guix i18n)
   #:use-module (guix base32)
-  #:use-module (guix diagnostics)
   #:use-module (guix memoization)
   #:use-module (guix packages)
   #:use-module (guix upstream)
-  #:use-module (guix build-system)
   #:use-module (guix build-system chicken)
   #:use-module (guix store)
   #:use-module ((guix download) #:select (download-to-store url-fetch))
   #:use-module (guix import utils)
-  #:use-module ((guix licenses) #:prefix license:)
   #:export (egg->guix-package
             egg-recursive-import
             %egg-updater
diff --git a/guix/import/elm.scm b/guix/import/elm.scm
index c8fb15343f..508bac5462 100644
--- a/guix/import/elm.scm
+++ b/guix/import/elm.scm
@@ -18,10 +18,8 @@
 
 (define-module (guix import elm)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
   #:use-module (ice-9 vlist)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
@@ -32,20 +30,11 @@ (define-module (guix import elm)
   #:use-module (guix memoization)
   #:use-module (guix diagnostics)
   #:use-module (guix i18n)
-  #:use-module ((guix ui) #:select (display-hint))
-  #:use-module ((guix build utils)
-                #:select ((package-name->name+version
-                           . hyphen-package-name->name+version)
-                          find-files
-                          invoke))
   #:use-module (guix import utils)
   #:use-module (guix git)
   #:use-module (guix import json)
   #:autoload   (gcrypt hash) (hash-algorithm sha256)
   #:use-module (json)
-  #:use-module (guix packages)
-  #:use-module (guix upstream)
-  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system elm)
   #:export (elm-recursive-import
             %elm-package-registry
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index f9e9f2de53..f71e758db4 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -34,22 +34,19 @@ (define-module (guix import elpa)
   #:use-module (srfi srfi-9 gnu)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
-  #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
+  #:use-module (guix i18n)
   #:use-module (guix diagnostics)
   #:use-module ((guix download) #:select (download-to-store))
   #:use-module (guix import utils)
   #:use-module (guix http-client)
   #:use-module (guix git)
   #:use-module (guix hash)
-  #:use-module ((guix serialization) #:select (write-file))
   #:use-module (guix store)
-  #:use-module (guix ui)
   #:use-module (guix base32)
   #:use-module (guix upstream)
   #:use-module (guix packages)
   #:use-module (guix memoization)
-  #:use-module ((guix utils) #:select (call-with-temporary-output-file))
   #:export (elpa->guix-package
             guix-package->elpa-name
             %elpa-updater
diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index c8d6cd4d2d..4e2be0f5f8 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -27,7 +27,6 @@ (define-module (guix import gem)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (json)
-  #:use-module ((guix download) #:prefix download:)
   #:use-module (guix import utils)
   #:use-module (guix import json)
   #:use-module (guix packages)
diff --git a/guix/import/git.scm b/guix/import/git.scm
index c15943bd7c..ab51719255 100644
--- a/guix/import/git.scm
+++ b/guix/import/git.scm
@@ -20,17 +20,14 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix import git)
-  #:use-module (guix build utils)
+  #:use-module (guix i18n)
   #:use-module (guix diagnostics)
   #:use-module (guix git)
   #:use-module (guix git-download)
-  #:use-module (guix i18n)
   #:use-module (guix packages)
   #:use-module (guix upstream)
   #:use-module (guix utils)
-  #:use-module (ice-9 format)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 rdelim)
   #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
diff --git a/guix/import/github.scm b/guix/import/github.scm
index a1bda5ec43..7409c9a202 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -35,13 +35,11 @@ (define-module (guix import github)
   #:use-module ((guix download) #:prefix download:)
   #:use-module ((guix git-download) #:prefix download:)
   #:autoload   (guix build download) (open-connection-for-uri)
-  #:use-module (guix import utils)
   #:use-module (json)
   #:use-module (guix packages)
   #:use-module (guix upstream)
   #:use-module (guix http-client)
   #:use-module (web uri)
-  #:use-module (web response)
   #:export (%github-api %github-updater))
 
 ;; For tests.
diff --git a/guix/import/gnome.scm b/guix/import/gnome.scm
index 3c5a96fdde..054ae44f7a 100644
--- a/guix/import/gnome.scm
+++ b/guix/import/gnome.scm
@@ -25,8 +25,6 @@ (define-module (guix import gnome)
   #:use-module (guix http-client)
   #:use-module (json)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
-  #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (web uri)
   #:use-module (ice-9 match)
diff --git a/guix/import/gnu.scm b/guix/import/gnu.scm
index cff088f423..fb61332fb8 100644
--- a/guix/import/gnu.scm
+++ b/guix/import/gnu.scm
@@ -23,19 +23,16 @@ (define-module (guix import gnu)
   #:use-module (guix gnu-maintenance)
   #:use-module (guix import utils)
   #:use-module (guix i18n)
-  #:use-module (guix utils)
   #:use-module (guix store)
   #:use-module (gcrypt hash)
   #:use-module (guix base32)
   #:use-module (guix upstream)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
   #:use-module (web uri)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
   #:export (gnu->guix-package))
 
 ;;; Commentary:
diff --git a/guix/import/go.scm b/guix/import/go.scm
index 90d4c8931d..0357e6a1eb 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -32,25 +32,20 @@ (define-module (guix import go)
   #:use-module (guix import utils)
   #:use-module (guix import json)
   #:use-module (guix packages)
-  #:use-module ((guix utils) #:select (string-replace-substring))
   #:use-module (guix http-client)
-  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix memoization)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
-  #:autoload   (guix serialization) (write-file)
   #:autoload   (guix base32) (bytevector->nix-base32-string)
   #:autoload   (guix build utils) (mkdir-p)
   #:autoload   (gcrypt hash) (hash-algorithm sha256)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 peg)
-  #:use-module (ice-9 rdelim)
   #:use-module (ice-9 receive)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 textual-ports)
   #:use-module ((rnrs io ports) #:select (call-with-port))
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-2)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
@@ -61,10 +56,7 @@ (define-module (guix import go)
                                          (if (eq? 'filter s)
                                              'xfilter
                                              s)))
-  #:use-module (web client)
-  #:use-module (web response)
   #:use-module (web uri)
-
   #:export (go-module->guix-package
             go-module->guix-package*
             go-module-recursive-import))
diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm
index dac5d1756f..628a44ff24 100644
--- a/guix/import/hexpm.scm
+++ b/guix/import/hexpm.scm
@@ -22,10 +22,6 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix import hexpm)
-  #:use-module (guix base32)
-  #:use-module ((guix download) #:prefix download:)
-  #:use-module (gcrypt hash)
-  #:use-module (guix http-client)
   #:use-module (json)
   #:use-module (guix import utils)
   #:use-module ((guix import json) #:select (json-fetch))
@@ -33,16 +29,11 @@ (define-module (guix import hexpm)
                 #:select ((package-name->name+version
                            . hyphen-package-name->name+version)
                           dump-port))
-  #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix monads)
   #:use-module (guix packages)
   #:use-module (guix upstream)
   #:use-module (guix utils)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
-  #:use-module (ice-9 popen)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-2)
   #:use-module (srfi srfi-26)
   #:use-module (guix build-system rebar)
   #:export (hexpm->guix-package
diff --git a/guix/import/kde.scm b/guix/import/kde.scm
index 3566312eca..0ae457ef3d 100644
--- a/guix/import/kde.scm
+++ b/guix/import/kde.scm
@@ -20,7 +20,6 @@
 
 (define-module (guix import kde)
   #:use-module (guix http-client)
-  #:use-module (guix memoization)
   #:use-module (guix gnu-maintenance)
   #:use-module (guix packages)
   #:use-module (guix upstream)
diff --git a/guix/import/minetest.scm b/guix/import/minetest.scm
index e5775e2fa9..7e7b6dd6ac 100644
--- a/guix/import/minetest.scm
+++ b/guix/import/minetest.scm
@@ -19,24 +19,17 @@
 
 (define-module (guix import minetest)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 receive)
   #:use-module (ice-9 threads)
   #:use-module (ice-9 hash-table)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-2)
-  #:use-module (srfi srfi-11)
-  #:use-module (srfi srfi-26)
   #:use-module (guix diagnostics)
   #:use-module ((guix packages) #:prefix package:)
   #:use-module (guix upstream)
-  #:use-module (guix utils)
-  #:use-module (guix ui)
   #:use-module (guix i18n)
   #:use-module (guix memoization)
   #:use-module (guix serialization)
   #:use-module (guix import utils)
   #:use-module (guix import json)
-  #:use-module ((gcrypt hash) #:select (open-sha256-port port-sha256))
   #:use-module (json)
   #:use-module (guix base32)
   #:use-module (guix git)
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index 938a88f69d..e336936306 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -22,23 +22,19 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix import opam)
-  #:use-module (ice-9 ftw)
   #:use-module (ice-9 match)
   #:use-module (ice-9 peg)
   #:use-module ((ice-9 popen) #:select (open-pipe*))
-  #:use-module (ice-9 receive)
   #:use-module (ice-9 textual-ports)
-  #:use-module (ice-9 vlist)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-2)
   #:use-module ((srfi srfi-26) #:select (cut))
   #:use-module ((web uri) #:select (string->uri uri->string))
   #:use-module ((guix build utils) #:select (dump-port find-files mkdir-p))
   #:use-module (guix build-system)
-  #:use-module (guix build-system ocaml)
+  #:use-module (guix i18n)
   #:use-module (guix diagnostics)
   #:use-module (guix http-client)
-  #:use-module (guix ui)
   #:use-module (guix packages)
   #:use-module (guix upstream)
   #:use-module ((guix utils) #:select (cache-directory
@@ -49,7 +45,6 @@ (define-module (guix import opam)
                                               recursive-import
                                               spdx-string->license
                                               url-fetch))
-  #:use-module ((guix licenses) #:prefix license:)
   #:export (opam->guix-package
             opam-recursive-import
             %opam-updater
diff --git a/guix/import/print.scm b/guix/import/print.scm
index 2f54adbd8c..08a484f5f3 100644
--- a/guix/import/print.scm
+++ b/guix/import/print.scm
@@ -19,12 +19,11 @@
 
 (define-module (guix import print)
   #:use-module (guix base32)
-  #:use-module (guix utils)
   #:use-module (guix licenses)
   #:use-module (guix packages)
+  #:use-module ((guix diagnostics) #:select (location-file))
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
-  #:use-module (gnu packages)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (guix import utils)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index c9aaacbc3f..261fdb46d9 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -36,7 +36,6 @@ (define-module (guix import pypi)
   #:use-module (ice-9 receive)
   #:use-module ((ice-9 rdelim) #:select (read-line))
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
@@ -51,13 +50,11 @@ (define-module (guix import pypi)
                           find-files
                           invoke))
   #:use-module (guix import utils)
-  #:use-module ((guix download) #:prefix download:)
   #:use-module (guix import json)
   #:use-module (json)
   #:use-module (guix packages)
   #:use-module (guix upstream)
   #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix build-system python)
   #:export (parse-requires.txt
             parse-wheel-metadata
             specification->requirement-name
diff --git a/guix/import/test.scm b/guix/import/test.scm
index 767dcd5b61..b1ed0b455d 100644
--- a/guix/import/test.scm
+++ b/guix/import/test.scm
@@ -18,8 +18,6 @@
 
 (define-module (guix import test)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
-  #:use-module (web uri)
   #:use-module (guix packages)
   #:use-module (guix upstream)
   #:use-module ((guix utils) #:select (version-prefix?))
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm
index 6bf7f92e60..82014ee568 100644
--- a/guix/import/texlive.scm
+++ b/guix/import/texlive.scm
@@ -35,9 +35,6 @@ (define-module (guix import texlive)
   #:use-module (guix serialization)
   #:use-module (guix svn-download)
   #:use-module (guix import utils)
-  #:use-module (guix utils)
-  #:use-module (guix upstream)
-  #:use-module (guix packages)
   #:use-module (guix build-system texlive)
   #:export (files-differ?
             texlive->guix-package
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 72795d2c61..bdec5c252c 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -39,7 +39,6 @@ (define-module (guix import utils)
   #:use-module (guix packages)
   #:use-module (guix discovery)
   #:use-module (guix build-system)
-  #:use-module (guix gexp)
   #:use-module ((guix i18n) #:select (G_))
   #:use-module (guix store)
   #:use-module (guix download)
diff --git a/guix/ipfs.scm b/guix/ipfs.scm
index 31a89888a7..3c25f2a499 100644
--- a/guix/ipfs.scm
+++ b/guix/ipfs.scm
@@ -18,15 +18,10 @@
 
 (define-module (guix ipfs)
   #:use-module (json)
-  #:use-module (guix base64)
-  #:use-module ((guix build utils) #:select (dump-port))
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
-  #:use-module (srfi srfi-26)
   #:use-module (rnrs io ports)
-  #:use-module (rnrs bytevectors)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 ftw)
   #:use-module (web uri)
   #:use-module (web client)
   #:use-module (web response)
diff --git a/guix/lint.scm b/guix/lint.scm
index 8e3976171f..040399e33c 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -33,7 +33,6 @@
 (define-module (guix lint)
   #:use-module (guix store)
   #:autoload   (guix base16) (bytevector->base16-string)
-  #:use-module (guix base32)
   #:autoload   (guix base64) (base64-encode)
   #:use-module (guix build-system)
   #:use-module (guix diagnostics)
diff --git a/guix/pki.scm b/guix/pki.scm
index c5b2fb9634..93932128cd 100644
--- a/guix/pki.scm
+++ b/guix/pki.scm
@@ -24,7 +24,6 @@ (define-module (guix pki)
   #:autoload   (srfi srfi-1) (delete-duplicates)
   #:use-module (ice-9 match)
   #:use-module (ice-9 rdelim)
-  #:use-module (ice-9 binary-ports)
   #:export (%public-key-file
             %private-key-file
             %acl-file
diff --git a/guix/records.scm b/guix/records.scm
index 1f097c7108..7d43b064d8 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -22,7 +22,6 @@ (define-module (guix records)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
   #:use-module (ice-9 rdelim)
   #:autoload (system base target) (target-most-positive-fixnum)
   #:export (define-record-type*
diff --git a/guix/remote.scm b/guix/remote.scm
index f6adb22846..a58ec2103c 100644
--- a/guix/remote.scm
+++ b/guix/remote.scm
@@ -32,8 +32,6 @@ (define-module (guix remote)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:use-module (ice-9 format)
-  #:use-module (ice-9 match)
   #:export (remote-eval))
 
 ;;; Commentary:
diff --git a/guix/scripts.scm b/guix/scripts.scm
index 395df864a3..5d11ce7fe9 100644
--- a/guix/scripts.scm
+++ b/guix/scripts.scm
@@ -28,7 +28,6 @@ (define-module (guix scripts)
   #:use-module (guix monads)
   #:use-module (guix packages)
   #:use-module (guix derivations)
-  #:use-module ((guix profiles) #:select (%profile-directory))
   #:autoload   (guix describe) (current-profile-date)
   #:use-module (guix build syscalls)
   #:use-module (srfi srfi-1)
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm
index 3b2bdee835..a7ff1593a6 100644
--- a/guix/scripts/archive.scm
+++ b/guix/scripts/archive.scm
@@ -18,7 +18,6 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix scripts archive)
-  #:use-module (guix config)
   #:use-module (guix utils)
   #:use-module (guix combinators)
   #:use-module ((guix build utils) #:select (mkdir-p))
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 6a4a32fc0a..72a24f91ac 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -27,7 +27,6 @@ (define-module (guix scripts build)
   #:use-module (guix store)
   #:use-module (guix derivations)
   #:use-module (guix packages)
-  #:use-module (guix memoization)
   #:use-module (guix utils)
   #:use-module (guix monads)
   #:use-module (guix gexp)
@@ -36,10 +35,8 @@ (define-module (guix scripts build)
   #:autoload   (guix http-client) (http-fetch http-get-error?)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 vlist)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm
index 620a1762a1..4821e11bf6 100644
--- a/guix/scripts/challenge.scm
+++ b/guix/scripts/challenge.scm
@@ -24,7 +24,6 @@ (define-module (guix scripts challenge)
   #:use-module (guix utils)
   #:use-module (guix monads)
   #:use-module (guix base32)
-  #:use-module (guix packages)
   #:use-module ((guix progress) #:hide (dump-port*))
   #:use-module (guix serialization)
   #:use-module (guix substitutes)
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index ef6f9acc86..14ce736174 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -26,7 +26,6 @@ (define-module (guix scripts deploy)
   #:use-module (guix store)
   #:use-module (guix gexp)
   #:use-module (guix ui)
-  #:use-module (guix utils)
   #:use-module ((guix status) #:select (with-status-verbosity))
   #:use-module (guix diagnostics)
   #:use-module (guix i18n)
diff --git a/guix/scripts/discover.scm b/guix/scripts/discover.scm
index dadade81bb..8970f835c9 100644
--- a/guix/scripts/discover.scm
+++ b/guix/scripts/discover.scm
@@ -23,7 +23,6 @@ (define-module (guix scripts discover)
   #:use-module (guix scripts)
   #:use-module (guix ui)
   #:use-module (guix utils)
-  #:use-module (guix build syscalls)
   #:use-module (guix build utils)
   #:use-module (guix scripts publish)
   #:use-module (avahi)
diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm
index 5a91390358..0ab5c8c39c 100644
--- a/guix/scripts/download.scm
+++ b/guix/scripts/download.scm
@@ -35,11 +35,8 @@ (define-module (guix scripts download)
   #:use-module (web uri)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-14)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-37)
-  #:use-module (rnrs bytevectors)
-  #:use-module (ice-9 binary-ports)
   #:export (guix-download))
 
 
diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm
index 8e777d1405..5ce2870c5a 100644
--- a/guix/scripts/edit.scm
+++ b/guix/scripts/edit.scm
@@ -22,7 +22,8 @@ (define-module (guix scripts edit)
   #:use-module (guix ui)
   #:use-module (guix scripts)
   #:use-module ((guix scripts build) #:select (%standard-build-options))
-  #:use-module (guix utils)
+  #:use-module ((guix diagnostics)
+                #:select (location-file location-line))
   #:use-module (gnu packages)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-37)
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm
index 6847dd1962..c075e0ec29 100644
--- a/guix/scripts/graph.scm
+++ b/guix/scripts/graph.scm
@@ -20,7 +20,6 @@
 (define-module (guix scripts graph)
   #:use-module (guix ui)
   #:use-module (guix graph)
-  #:use-module (guix grafts)
   #:use-module (guix scripts)
   #:use-module (guix packages)
   #:use-module (guix monads)
diff --git a/guix/scripts/hash.scm b/guix/scripts/hash.scm
index 4e792c6a03..6dc67a2416 100644
--- a/guix/scripts/hash.scm
+++ b/guix/scripts/hash.scm
@@ -23,18 +23,14 @@
 
 (define-module (guix scripts hash)
   #:use-module (gcrypt hash)
-  #:use-module (guix serialization)
   #:use-module (guix ui)
   #:use-module (guix hash)
   #:use-module (guix scripts)
   #:use-module (guix base16)
   #:use-module (guix base32)
   #:autoload   (guix base64) (base64-encode)
-  #:use-module (ice-9 binary-ports)
-  #:use-module (rnrs files)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-37)
   #:autoload   (disarchive git-hash) (git-hash-file git-hash-directory)
diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index 8ff8182a79..954bb0045f 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -22,9 +22,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix scripts home)
-  #:use-module (gnu packages admin)
   #:use-module ((gnu services) #:hide (delete))
-  #:use-module (gnu packages)
   #:autoload   (gnu packages base) (coreutils)
   #:autoload   (gnu packages bash) (bash)
   #:autoload   (gnu packages gnupg) (guile-gcrypt)
diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index fe1d7a8dda..f84a964a53 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -28,9 +28,6 @@ (define-module (guix scripts import)
   #:use-module (guix read-print)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
-  #:use-module (srfi srfi-26)
-  #:use-module (srfi srfi-37)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:export (%standard-import-options
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 8c6132e7c3..7b76126d35 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -39,7 +39,6 @@ (define-module (guix scripts offload)
   #:autoload   (guix derivations) (read-derivation-from-file
                                    derivation-file-name
                                    build-derivations)
-  #:autoload   (guix serialization) (nar-error? nar-error-file)
   #:autoload   (guix nar) (restore-file-set)
   #:use-module ((guix utils) #:select (%current-system))
   #:use-module ((guix build syscalls)
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index eb41eb5563..25ac9d29d0 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -28,7 +28,6 @@ (define-module (guix scripts pack)
   #:use-module (guix scripts)
   #:use-module (guix ui)
   #:use-module (guix gexp)
-  #:use-module ((guix build utils) #:select (%xz-parallel-args))
   #:use-module (guix utils)
   #:use-module (guix store)
   #:use-module ((guix status) #:select (with-status-verbosity))
@@ -54,7 +53,6 @@ (define-module (guix scripts pack)
   #:use-module ((gnu packages compression) #:hide (zip))
   #:use-module (gnu packages guile)
   #:use-module (gnu packages base)
-  #:autoload   (gnu packages package-management) (guix)
   #:autoload   (gnu packages gnupg) (guile-gcrypt)
   #:autoload   (gnu packages guile) (guile2.0-json guile-json)
   #:use-module (srfi srfi-1)
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 945e2f2cca..f1eef9dfaf 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -38,9 +38,7 @@ (define-module (guix scripts package)
   #:use-module (guix profiles)
   #:use-module (guix search-paths)
   #:autoload   (guix import json) (json->scheme-file)
-  #:use-module (guix monads)
   #:use-module (guix utils)
-  #:use-module (guix config)
   #:use-module (guix scripts)
   #:use-module (guix scripts build)
   #:use-module (guix transformations)
@@ -48,12 +46,9 @@ (define-module (guix scripts package)
                                 manifest-entry-with-provenance)
   #:autoload   (guix channels) (channel-name channel-commit channel->code)
   #:autoload   (guix store roots) (gc-roots user-owned?)
-  #:use-module ((guix build utils)
-                #:select (directory-exists? mkdir-p))
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:autoload   (ice-9 pretty-print) (pretty-print)
-  #:use-module (ice-9 regex)
   #:use-module (ice-9 vlist)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index 6307ae54bb..ada81838ac 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -23,16 +23,13 @@
 
 (define-module (guix scripts publish)
   #:use-module ((system repl server) #:prefix repl:)
-  #:use-module (ice-9 binary-ports)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 poll)
-  #:use-module (ice-9 regex)
   #:use-module (ice-9 rdelim)
   #:use-module (ice-9 threads)
   #:use-module (rnrs bytevectors)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-2)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-9 gnu)
   #:use-module (srfi srfi-19)
@@ -50,7 +47,6 @@ (define-module (guix scripts publish)
   #:use-module (guix base32)
   #:use-module (guix base64)
   #:use-module (guix config)
-  #:use-module (guix derivations)
   #:use-module (gcrypt hash)
   #:use-module (guix pki)
   #:use-module (gcrypt pk-crypto)
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 2be8de3b9c..cd2e470289 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -30,7 +30,6 @@ (define-module (guix scripts pull)
   #:use-module (guix packages)
   #:use-module (guix derivations)
   #:use-module (guix profiles)
-  #:use-module (guix gexp)
   #:use-module (guix memoization)
   #:use-module (guix monads)
   #:use-module (guix channels)
@@ -45,7 +44,6 @@ (define-module (guix scripts pull)
   #:autoload   (gnu packages) (fold-available-packages)
   #:autoload   (guix scripts package) (build-and-use-profile
                                        delete-matching-generations)
-  #:autoload   (gnu packages base) (canonical-package)
   #:autoload   (gnu packages bootstrap) (%bootstrap-guile)
   #:autoload   (gnu packages certs) (le-certs)
   #:use-module (srfi srfi-1)
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index 6498d73c2b..ee94ed29a1 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -43,15 +43,12 @@ (define-module (guix scripts refresh)
   #:use-module (gnu packages)
   #:use-module ((gnu packages commencement) #:select (%final-inputs))
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
-  #:use-module (ice-9 vlist)
   #:use-module (ice-9 format)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-37)
   #:use-module (srfi srfi-71)
-  #:use-module (ice-9 binary-ports)
   #:export (guix-refresh))
 
 
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index 0b978ae35f..fd23a2b982 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -23,10 +23,8 @@ (define-module (guix scripts repl)
   #:use-module (guix scripts)
   #:use-module (guix repl)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-37)
   #:use-module (ice-9 match)
-  #:use-module (rnrs bytevectors)
   #:autoload   (guix describe) (current-profile)
   #:autoload   (system repl repl) (start-repl)
   #:autoload   (system repl server)
diff --git a/guix/scripts/search.scm b/guix/scripts/search.scm
index 27b9da5278..307ea410b9 100644
--- a/guix/scripts/search.scm
+++ b/guix/scripts/search.scm
@@ -24,7 +24,6 @@ (define-module (guix scripts search)
                 #:select (%standard-build-options))
   #:use-module (guix scripts)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-37)
   #:export (guix-search))
 
diff --git a/guix/scripts/show.scm b/guix/scripts/show.scm
index c747eedd21..f6d8256951 100644
--- a/guix/scripts/show.scm
+++ b/guix/scripts/show.scm
@@ -23,7 +23,6 @@ (define-module (guix scripts show)
                 #:select (%standard-build-options))
   #:use-module (guix scripts)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-37)
   #:export (guix-show))
 
diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm
index fa7175fb16..8e89a58948 100644
--- a/guix/scripts/style.scm
+++ b/guix/scripts/style.scm
@@ -31,7 +31,6 @@ (define-module (guix scripts style)
   #:autoload   (gnu packages) (specification->package fold-packages)
   #:use-module (guix scripts)
   #:use-module ((guix scripts build) #:select (%standard-build-options))
-  #:use-module (guix combinators)
   #:use-module (guix ui)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -42,7 +41,6 @@ (define-module (guix scripts style)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
-  #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-37)
   #:export (guix-style))
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index fedb33019d..109b0c7900 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -26,7 +26,6 @@ (define-module (guix scripts substitute)
   #:use-module (guix store)
   #:use-module (guix substitutes)
   #:use-module (guix utils)
-  #:use-module (guix combinators)
   #:use-module (guix config)
   #:use-module (guix records)
   #:use-module (guix diagnostics)
@@ -36,7 +35,6 @@ (define-module (guix scripts substitute)
   #:autoload   (guix scripts discover) (read-substitute-urls)
   #:use-module (gcrypt hash)
   #:use-module (guix base32)
-  #:use-module (guix base64)
   #:use-module (guix cache)
   #:use-module (gcrypt pk-crypto)
   #:use-module (guix pki)
@@ -55,10 +53,8 @@ (define-module (guix scripts substitute)
   #:use-module (ice-9 ftw)
   #:use-module (rnrs bytevectors)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-19)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
-  #:use-module (srfi srfi-35)
   #:use-module (srfi srfi-71)
   #:use-module (web uri)
   #:use-module (guix http-client)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index c0bc295c00..d7163dd3eb 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -55,20 +55,14 @@ (define-module (guix scripts system)
   #:autoload   (guix scripts pull) (channel-commit-hyperlink)
   #:autoload   (guix graph) (export-graph node-type
                              graph-backend-name lookup-backend)
-  #:use-module (guix scripts graph)
   #:use-module (guix scripts system reconfigure)
   #:use-module (guix build utils)
   #:use-module (guix progress)
-  #:use-module ((guix build syscalls) #:select (terminal-columns))
   #:use-module (gnu build image)
   #:use-module (gnu build install)
   #:autoload   (gnu build file-systems)
                  (find-partition-by-label find-partition-by-uuid)
-  #:autoload   (gnu build linux-modules)
-                 (device-module-aliases matching-modules)
-  #:use-module (gnu system linux-initrd)
   #:use-module (gnu image)
-  #:use-module (guix platform)
   #:use-module (gnu system)
   #:use-module (gnu bootloader)
   #:use-module (gnu system file-systems)
@@ -81,7 +75,6 @@ (define-module (guix scripts system)
   #:use-module (gnu services shepherd)
   #:use-module (gnu services herd)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-19)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm
index 5179ea035f..d7c71ef705 100644
--- a/guix/scripts/time-machine.scm
+++ b/guix/scripts/time-machine.scm
@@ -22,7 +22,6 @@ (define-module (guix scripts time-machine)
   #:use-module (guix ui)
   #:use-module (guix scripts)
   #:use-module (guix inferior)
-  #:use-module (guix channels)
   #:use-module (guix store)
   #:use-module (guix status)
   #:use-module ((guix git)
diff --git a/guix/self.scm b/guix/self.scm
index 93019e1c64..d1dcde34ac 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -19,7 +19,6 @@
 
 (define-module (guix self)
   #:use-module (guix config)
-  #:use-module (guix i18n)
   #:use-module (guix modules)
   #:use-module (guix gexp)
   #:use-module (guix store)
diff --git a/guix/serialization.scm b/guix/serialization.scm
index 9b888a7d25..9656e5ac2a 100644
--- a/guix/serialization.scm
+++ b/guix/serialization.scm
@@ -17,7 +17,6 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix serialization)
-  #:use-module (guix combinators)
   #:use-module (rnrs bytevectors)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
diff --git a/guix/status.scm b/guix/status.scm
index a192cd789a..d4d3fca026 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -27,7 +27,6 @@ (define-module (guix status)
   #:autoload   (guix build download) (nar-uri-abbreviation)
   #:use-module (guix store)
   #:use-module (guix derivations)
-  #:use-module (guix memoization)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-9 gnu)
diff --git a/guix/store.scm b/guix/store.scm
index a36dce416e..f8e77b2cd9 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -24,7 +24,6 @@ (define-module (guix store)
   #:use-module (guix utils)
   #:use-module (guix config)
   #:use-module (guix deprecation)
-  #:use-module (guix memoization)
   #:use-module (guix serialization)
   #:use-module (guix monads)
   #:use-module (guix records)
@@ -45,7 +44,6 @@ (define-module (guix store)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:use-module (srfi srfi-39)
   #:use-module (ice-9 match)
   #:use-module (ice-9 vlist)
   #:use-module (ice-9 popen)
diff --git a/guix/store/database.scm b/guix/store/database.scm
index e664015673..2968f13492 100644
--- a/guix/store/database.scm
+++ b/guix/store/database.scm
@@ -22,7 +22,6 @@
 (define-module (guix store database)
   #:use-module (sqlite3)
   #:use-module (guix config)
-  #:use-module (guix serialization)
   #:use-module (guix store deduplication)
   #:use-module (guix base16)
   #:use-module (guix progress)
@@ -36,7 +35,6 @@ (define-module (guix store database)
   #:use-module (srfi srfi-26)
   #:use-module (rnrs io ports)
   #:use-module (ice-9 match)
-  #:use-module (system foreign)
   #:export (sql-schema
             %default-database-file
             store-database-file
diff --git a/guix/store/deduplication.scm b/guix/store/deduplication.scm
index acb6ffcc4a..129574c073 100644
--- a/guix/store/deduplication.scm
+++ b/guix/store/deduplication.scm
@@ -28,9 +28,7 @@ (define-module (guix store deduplication)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:use-module (rnrs bytevectors)
   #:use-module (rnrs io ports)
-  #:use-module (ice-9 ftw)
   #:use-module (ice-9 match)
   #:use-module (guix serialization)
   #:export (nar-sha256
diff --git a/guix/substitutes.scm b/guix/substitutes.scm
index edff84aac3..84c7be83ca 100644
--- a/guix/substitutes.scm
+++ b/guix/substitutes.scm
@@ -25,26 +25,19 @@ (define-module (guix substitutes)
   #:use-module (guix utils)
   #:use-module (guix combinators)
   #:use-module (guix config)
-  #:use-module (guix records)
   #:use-module (guix diagnostics)
   #:use-module (guix i18n)
   #:use-module (gcrypt hash)
   #:use-module (guix base32)
-  #:use-module (guix base64)
   #:use-module (guix cache)
-  #:use-module (gcrypt pk-crypto)
-  #:use-module (guix pki)
   #:use-module ((guix build utils) #:select (mkdir-p dump-port))
   #:use-module ((guix build download)
                 #:select ((open-connection-for-uri
                            . guix:open-connection-for-uri)
                           resolve-uri-reference))
   #:use-module (guix progress)
-  #:use-module (ice-9 rdelim)
-  #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
-  #:use-module (ice-9 ftw)
   #:use-module (ice-9 binary-ports)
   #:use-module (ice-9 vlist)
   #:use-module (rnrs bytevectors)
@@ -52,8 +45,6 @@ (define-module (guix substitutes)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-19)
   #:use-module (srfi srfi-26)
-  #:use-module (srfi srfi-34)
-  #:use-module (srfi srfi-35)
   #:use-module (web uri)
   #:use-module (web request)
   #:use-module (web response)
diff --git a/guix/tests/gnupg.scm b/guix/tests/gnupg.scm
index 09f02a2b67..0e4573ae4d 100644
--- a/guix/tests/gnupg.scm
+++ b/guix/tests/gnupg.scm
@@ -21,7 +21,6 @@ (define-module (guix tests gnupg)
   #:use-module (guix utils)
   #:use-module (guix build utils)
   #:use-module (rnrs io ports)
-  #:use-module (ice-9 match)
   #:export (gpg-command
             gpgconf-command
             with-fresh-gnupg-setup
diff --git a/guix/tests/http.scm b/guix/tests/http.scm
index 8f50eaefca..37e5744353 100644
--- a/guix/tests/http.scm
+++ b/guix/tests/http.scm
@@ -23,7 +23,6 @@ (define-module (guix tests http)
   #:use-module (web server http)
   #:use-module (web response)
   #:use-module (srfi srfi-11)
-  #:use-module (srfi srfi-39)
   #:use-module (ice-9 match)
   #:export (with-http-server
             call-with-http-server
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 4c72388bf3..52fae11832 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -48,7 +48,6 @@ (define-module (guix upstream)
   #:use-module (srfi srfi-35)
   #:use-module (rnrs bytevectors)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
   #:export (upstream-source
             upstream-source?
             upstream-source-package
diff --git a/guix/utils.scm b/guix/utils.scm
index 774b80cd25..943d540bfc 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -36,10 +36,8 @@
 (define-module (guix utils)
   #:use-module (guix config)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
-  #:use-module (srfi srfi-39)
   #:use-module (srfi srfi-71)
   #:use-module (rnrs io ports)                    ;need 'port-position' etc.
   #:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!))
@@ -51,7 +49,6 @@ (define-module (guix utils)
   #:use-module ((guix combinators) #:select (fold2))
   #:use-module (guix diagnostics)           ;<location>, &error-location, etc.
   #:use-module (ice-9 format)
-  #:use-module (ice-9 ftw)
   #:use-module ((ice-9 iconv) #:prefix iconv:)
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex)

base-commit: 0a37921d851b94aef6900214098dc5bd62b46e26
-- 
2.39.1