forge cache clean


forge-cache-clean - Cleans cached data from ~/.foundry.


forge cache clean [options] [] [chains..]


Removes files in the ~/.foundry/cache folder which is used to cache Etherscan verification status and block data.


    One or more block numbers separated by comma with no spaces

--etherscan     A boolean flag that specifies to only remove the block explorer portion of the cache

Common Options

    Prints help information.


  1. Remove the entire cache (also, forge cache clean is an alias for this)

    forge cache clean all
  2. Remove the entire block explorer cache

    forge cache clean all --etherscan
  3. Remove cache data for a specific chain, by name

    forge cache clean rinkeby
  4. Remove cache data for a specific block number on a specific chain. Does not work if chain is all

    forge cache clean rinkeby -b 150000
  5. Remove block explorer cache data for a specific chain. Does not work if --blocks are specified.

    forge cache clean rinkeby --etherscan
  6. Specify multiple chains

    forge cache clean rinkeby mainnet
  7. Specify multiple blocks

    forge cache clean rinkeby --blocks 530000,9000000,9200000


forge, forge cache