On this page:
3.1 raco pkg install
3.2 raco pkg update
3.3 raco pkg remove
3.4 raco pkg show
3.5 raco pkg migrate
3.6 raco pkg create
3.7 raco pkg config
3.8 raco pkg catalog-show
3.9 raco pkg catalog-copy

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, the current directory is installed as a link. See the --link flag below for more details.

The install sub-command accepts the following options:

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).

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

The update sub-command accepts the following options:

3.3 raco pkg remove

raco pkg remove option ... pkg ... — Attempts to remove 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 remove sub-command accepts the following options:

3.4 raco pkg show

raco pkg show option ... — Print information about currently installed packages. By default, packages are shown for all package scopes, but only for packages not marked as auto-installed to fulfill dependencies.

The show sub-command accepts the following options:

3.5 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:

3.6 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 GitHub 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:

3.7 raco pkg config

raco pkg config option ... [key] val ... — View and modify 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 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.

  • 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.

3.8 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:

3.9 raco pkg catalog-copy

raco pkg catalog-copy option ... src-catalog ... dest-catalog Copies information from package catalog names 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: