Leaf Remote

leaf remote - configure remote package repository locations

leaf remote [list]

leaf remote add ALIAS URL --insecure|--gpg GPGKEY

leaf remote remove ALIAS...

leaf remote enable ALIAS...

leaf remote disable ALIAS...

leaf remote fetch

leaf remote command allows to manage remote url repositories of packages. (i.e. a location from which leaf is downloading and installing packages.)

Remotes are stored/configured in the leaf configuration file (see leaf config).


list Lists the configured remotes. (default command)

  • [blank]: displays a table with ALIAS, URL and the enable/disable state for each remote.
  • -v: as above, plus the fetched state (has this remote being fetched yet) and the last time the packages were cached from the remote.
  • -q: displays only ALIAS list
The list command must be specified if one of the -q|-v option is specified.


Adds a remote to the user configuration (you also must specify):

  • the remote ALIAS: a user defined name used to identify the remote within the leaf environment
  • the remote URL: the URL to the remote index file
  • the security option: either --insecure or --gpg; see below


Removes the ALIAS remote(s) from the user configuration.


Enables the ALIAS remote(s) in the user configuration; Enabled remotes will be queried in all fetch operations.


Disables the ALIAS remote(s) in the user configuration; Disabled remotes will NOT be queried in any fetch operation.


Triggers the remote fetch operation: package information is retrieved from all enabled remotes in the configuration. fetch also refreshes the local cached index of packages in leaf search.



A user defined name to identify the remote in all other leaf commands; must be unique.


URL to the remote index file. https, http, and file protocols are supported.

If the "remote" index is a local file, absolute path to this file can be specified, without the file: prefix.


When adding a remote, specifies that no index signature verification is needed.

--gpg GPGKEY

When adding a remote, specifies that an index needs to be verified and signed with the key identified in the GPGKEY fingerprint.


List remotes:

leaf remote or leaf remote list

List remotes with more details:

leaf remote list -v

Add remote:

leaf remote add myremote http://myserver.org/path/to/index.json --gpg <key>

Add remote (insecure):

leaf remote add myremote-insecure http://myserver.org/path/to/index.json --insecure

Remove remote:

leaf remote remove myremote

Enable remote:

leaf remote enable myremote

Disable remote:

leaf remote disable myremote

Fetch remote information:

leaf remote fetch


The package information read from enabled remotes is stored in the leaf cache (leaf config).

As the package information fetch is an important part of the leaf workflows, the leaf remote fetch is implicit and automatically triggered by commands that are related to remote available packages (e.g. leaf search, leaf setup, leaf package install, etc). This smart remote fetch is triggered only if the cache is considered as invalid.

The remote cache is considered as invalid if:

  • remotes were never fetched
  • the remotes configuration has changed since the last fetch (something added, removed, enabled or disabled)
  • the current cache information is more than 24 hours old
The leaf remote fetch operation forces a remote fetch operation immediately.