On this page:
3.1 raco pkg install
3.2 raco pkg update
3.3 raco pkg uninstall
3.4 raco pkg remove
3.5 raco pkg new
3.6 raco pkg show
3.7 raco pkg migrate
3.8 raco pkg create
3.9 raco pkg config
3.10 raco pkg catalog-show
3.11 raco pkg catalog-copy
3.12 raco pkg catalog-archive
3.13 raco pkg archive
3.14 raco pkg empty-trash

3 Using raco pkg🔗ℹ

The raco pkg command provides package-management tools via sub-commands.

3.1 raco pkg install🔗ℹ

raco pkg install option ... pkg-source ... — Installs the given package sources (eliminating exact-duplicate pkg-sources). If a given pkg-source is auto-installed (to satisfy some other package’s dependency), then it is promoted to explicitly installed.

If no pkg-sources are supplied and the --clone flag is not supplied, the current directory is installed as a link. See the --link flag below for more details.

If no pkg-sources are supplied and the --clone flag is supplied, then the clone directory’s name is used as the only pkg-source argument. See the --clone flag below for more details.

The install sub-command accepts the following options:

Changed in version 6.1.1.5: Added the --batch, --clone, and --multi-clone flags.
Changed in version 6.1.1.6: Added the --no-trash flag, and changed the --deps default to depend only on interactive mode.
Changed in version 6.1.1.8: Added the --pull flag.
Changed in version 6.4.0.14: Added the --dry-run flag.
Changed in version 7.2.0.8: Added the --recompile-only flag.
Changed in version 7.4.0.4: Added the --no-docs, -D flags.
Changed in version 7.6.0.14: Allowed multiple --catalog flags.
Changed in version 8.0.0.13: Added git-url as a --type option.

3.2 raco pkg update🔗ℹ

raco pkg update option ... pkg-source ... — Checks the specified package names for package updates or replaces existing package installations with the given sources. If an update or replacement cannot be installed (e.g. it conflicts with another installed package), then this command fails without installing any of the pkg-sources (or their dependencies).

The treatment of a pkg-source depends on the way that it parses:

If no pkg-source, --all or -a flag, or --clone flag is specified, and if the current directory is within a package, then the enclosing package is updated. If no pkg-source is specified, but --clone is supplied, then the clone directory’s name is used as the only pkg-source argument.

If a package scope is not specified, the scope is inferred from the given pkg-sources.

The update sub-command accepts the following options:

Changed in version 6.1.1.5: Added the --batch, --clone, and --multi-clone flags, and added update of enclosing package when no arguments are provided.
Changed in version 6.1.1.6: Added the --no-trash flag, and changed the --deps default to depend only on interactive mode.
Changed in version 6.1.1.8: Added the --skip-uninstalled and --pull flags.
Changed in version 6.4.0.14: Added the --dry-run flag.
Changed in version 6.90.0.27: Added the --unclone flag.
Changed in version 7.2.0.8: Added the --recompile-only flag.
Changed in version 7.4.0.4: Added the --no-docs, -D flags.
Changed in version 7.6.0.14: Allowed multiple --catalog flags.

3.3 raco pkg uninstall🔗ℹ

raco pkg uninstall option ... pkg ... — Attempts to uninstall the given packages. By default, if a package is the dependency of another package that is not listed, this command fails without removing any of the pkgs.

If a package scope is not specified, the scope is inferred from the given pkgs.

The uninstall sub-command accepts the following options:

Changed in version 6.1.1.5: Added the --batch flag.
Changed in version 6.1.1.6: Added the --no-trash flag.
Changed in version 6.4.0.14: Added the --dry-run flag.
Changed in version 7.2.0.8: Added the --recompile-only flag.
Changed in version 7.4.0.4: Added the --no-docs, -D flags.
Changed in version 8.14.0.2: Renamed from raco pkg remove to raco pkg uninstall.

3.4 raco pkg remove🔗ℹ

raco pkg remove A synonym for raco pkg uninstall.

Changed in version 8.14.0.2: Made raco pkg remove an alias.

3.5 raco pkg new🔗ℹ

raco pkg new pkg Populates a directory with the stubs for a new package, where pkg is the name of the new package. If pkg already exists as a directory in the current directory, no new package is created.

Added in version 6.1.1.5.

3.6 raco pkg show🔗ℹ

raco pkg show option ... pkg ... — Prints information about currently installed packages.

If pkgs are specified, then only those packages are shown. By default, packages are shown for all package scopes, but only for packages not marked as auto-installed. If a package is explicitly specified, it is shown even if it is marked as auto-installed. Unless -l or --long is specified, the output is roughly constrained to 80 columns or the number of columns specified by the COLUMNS environment variable. Unless --full-checksum is specified, checksums are abbreviated to 8 characters.

The show sub-command accepts the following options:

Changed in version 6.1.1.5: Added -l/--long and COLUMNS support.
Changed in version 6.1.1.6: Added explicit pkgs and --rx and --full-sha.

3.7 raco pkg migrate🔗ℹ

raco pkg migrate option ... from-version Installs packages that were previously installed in user package scope for from-version, where from-version is an installation name/version.

The migrate sub-command accepts the following options:

Changed in version 6.4.0.14: Added the --dry-run flag.
Changed in version 7.2.0.8: Added the --recompile-only flag.
Changed in version 7.4.0.4: Added the --no-docs, -D flags.
Changed in version 7.6.0.14: Allowed multiple --catalog flags.

3.8 raco pkg create🔗ℹ

raco pkg create option ... directory-or-package Bundles a package into an archive. Bundling is not needed for a package that is provided directly from a Git repository or other non-archive formats. The create sub-command can create an archive from a directory (the default) or from an installed package. It can also adjust the archive’s content to include only sources, only compiled bytecode and rendered documentation, or both—but packages are normally provided as source and converted to binary form by an automatic service, instead of by a package author.

The create sub-command accepts the following options:

Changed in version 8.14.0.2: Added the --original flag.

3.9 raco pkg config🔗ℹ

raco pkg config option ... [key] val ... — Views and modifies the configuration of the package manager. If key is not provided, the values for all recognized keys are shown. The val arguments are allowed only when --set is used, in which case the vals are used as the new values for key.

The config sub-command accepts with the following options:

The valid keys and corresponding vals are:
  • name A string for the installation’s name, which is used by user package scope and defaults to the Racket version.

  • catalogs A list of URLs for package catalogs. An empty-string val is replaced by the sequence of catalogs for the default configuration. A val that does not start with alphabetic characters followed by :// is treated as a path relative to the configuration directory (as reported by find-config-dir).

  • default-scope Either installation or user. The value of this key at user scope (possibly defaulting from installation scope) is the default package scope for raco pkg commands for which a scope is not inferred from a given set of package names (even for raco pkg config, which is consistent but potentially confusing).

  • download-cache-dir A directory that holds copies of downloaded packages, used to avoid re-downloading if the same URL and checksum combination is requested again. The default cache directory is user-specific (but not specific to a Racket version or installation name).

  • download-cache-max-files A limit on the number of files to be kept in the download cache directory.

  • download-cache-max-bytes A limit on the total size of files that are kept in the download cache directory.

  • doc-open-url A URL to use in place of a local filesystem path for viewing (or at least searching) documentation; an empty string, which is the default, disables the URL so that the local filesystem is used. This key can be set only in installation scope.

  • git-checkout-credentials A list that starts with a format specification (currently only 'basic is supported), followed by git credentials in the form username:password that are tried when downloading packages with git sources using the HTTP or HTTPS protocols. The credentials are currently stored unencrypted on the filesystem.

  • trash-max-packages A limit on the number of package implementations that are kept in a trash folder when the package is uninstalled or updated.

  • trash-max-seconds A limit on the time since a package is uninstalled or updated that its implementation is kept in the trash folder. Package implementations are removed from a trash folder only when another package is potentially added to the trash folder or raco pkg empty-trash is used.

  • network-retries The number of times to retry a network communication that fails due to a connection error.

Changed in version 6.1.1.6: Added trash-max-packages and trash-max-seconds.
Changed in version 6.3: Added network-retries.
Changed in version 6.6.0.5: Added git-checkout-credentials.

3.10 raco pkg catalog-show🔗ℹ

raco pkg catalog-show option ... package-name ... — Consults package catalogs for a package (that is not necessarily installed) and displays the catalog’s information for the package, such as its source URL and a checksum.

The catalog-show sub-command accepts the following options:

  • --all Shows information for all available packages. When using this flag, supply no package-names.

  • --only-names Shows only package names. This option is mainly useful with --all, but when a package-name is provided, catalogs are consulted to ensure that he package is available.

  • --modules Shows the modules that are implemented by a package.

  • --catalog catalog Queries catalogs instead of the currently configured package catalogs. This flag can be provided multiple times. The catalogs are tried in the order provided.

  • --version version or -v version Queries catalogs for a result specific to version, instead of the installation’s Racket version.

Changed in version 7.6.0.14: Allowed multiple --catalog flags.

3.11 raco pkg catalog-copy🔗ℹ

raco pkg catalog-copy option ... src-catalog ... dest-catalog Copies information from the package catalog named by src-catalogs to a local database or directory dest-catalog, which can be used as a new package catalog.

The src-catalogs can be remote or local, while dest-catalog must be local (i.e., a directory path or a SQLite database path, as inferred from the path). If a src-catalog or dest-catalog does not start with a URL scheme, it is treated as a filesystem path. Information from multiple src-catalogs is merged, with information from earlier src-catalogs taking precedence over later src-catalogs.

The catalog-copy sub-command accepts the following options:

3.12 raco pkg catalog-archive🔗ℹ

raco pkg catalog-archive option ... dest-dir src-catalog ... — Copies information from the package catalog named by src-catalogs to a "catalog" directory catalog in dest-dir, and also copies all package sources to a "pkgs" directory in dest-dir.

Packages sources are downloaded and repacked as needed, so that all packages are written to the "pkgs" directory as ".zip" archives. This conversion may change the checksum on each archived package.

The catalog-archive sub-command accepts the following options:

Added in version 6.0.17.
Changed in version 7.7.0.1: Added --include, --include-deps, --include-deps-platform, --exclude, and --fast-file-copy.

3.13 raco pkg archive🔗ℹ

raco pkg archive option ... dest-dir pkg ... — Copies information from installed packages named by pkgss to a "catalog" directory catalog in dest-dir, and also copies all package sources to a "pkgs" directory in dest-dir.

Packages sources are copied and repacked as needed, so that all packages are written to the "pkgs" directory as ".zip" archives. This conversion may change the checksum on each archived package.

The archive sub-command accepts the following options:

Added in version 6.1.0.8.

3.14 raco pkg empty-trash🔗ℹ

raco pkg empty-trash option ... — Removes or lists package implementations that were previously uninstalled or updated and are currently in the trash directory for the specified package scope. The trash-max-packages and trash-max-seconds configuration keys (see raco pkg config) control how many packages are kept in the trash directory and for how long.

The empty-trash sub-command accepts the following options:

Added in version 6.1.1.6.