dfx cache
Use the dfx cache
command to manage the dfx
version cache. When a version of dfx
is installed, it is added to the version cache.
The basic syntax for running dfx cache
commands is:
dfx cache [subcommand] [flag]
Depending on the dfx cache
subcommand you specify, additional arguments, options, and flags might apply. For reference information and examples that illustrate using dfx cache
commands, select an appropriate command.
Command | Description |
---|---|
delete | Deletes the specified version of dfx from the local cache. |
help | Displays usage information message for the dfx cache command. |
install | Installs the specified version of dfx from the local cache. |
list | Lists the versions of dfx currently installed and used in current projects. |
show | Show the path of the cache used by this version of the dfx executable. |
To view usage information for a specific subcommand, specify the subcommand and the --help
flag. For example, to see usage information for dfx cache delete
, you can run the following command:
dfx cache delete --help
dfx cache delete
Use the dfx cache delete
command to delete a specified version of dfx
from the version cache on the local computer.
Basic usage
dfx cache delete [version] [flag]
Arguments
You can specify the following argument for the dfx cache delete
command.
Command | Description |
---|---|
version | Specifies the version of dfx you to delete from the local cache. |
Example
dfx cache delete 0.6.2
dfx cache install
Use the dfx cache install
command to install the latest dfx
version currently found in the dfx
cache.
Basic usage
dfx cache install [flag]
Example
dfx cache install
dfx cache list
Use the dfx cache list
command to list dfx
versions you have currently installed and used in projects.
If you have multiple versions of dfx
installed, the cache list displays an asterisk (*) to indicate the currently active version.
Basic usage
dfx cache list [flag]
Example
dfx cache list
This command displays the list of dfx
versions found similar to the following:
0.6.4 *
0.6.3
0.6.0
dfx cache show
Use the dfx cache show
command to display the full path to the cache used by the dfx
version you are currently using.
Basic usage
dfx cache show [flag]
Example
dfx cache show
This command displays the path to the cache used by the IC SDK version you are currently using:
/Users/pubs/.cache/dfinity/versions/0.6.4