I have learned substrate some weaks ago, and due to generating of new blocks, my storage of pc is getting full.

  • What do you mean delete the blocks? Remove the unused data or prune the data?
    – AurevoirXavier
    Commented Aug 28, 2022 at 12:10
  • Yeah How should I delete unused data Commented Aug 29, 2022 at 8:06

2 Answers 2


If you are just trying it out you should run the node with the following flag --tmp.

If you were using the --dev flag it should also delete everything on stop.

When you start the node, you should look for the following line:

2022-08-28 17:01:20 💾 Database: RocksDb at /var/folders/19/5tshxn412wx071h968j4s3s00000gn/T/substrate5R32Qo/chains/dev/db/full

If anything is being persisted, that's the path you need to clean.

I haven't run into that issue yet although I have a good amount of blocks stored. Are you sure the blocks are the issue? Note that the node itself can be more than 8GB

  • Yeah, may be due to nodes, my storage is getting full. Where nodes are getting stored? Commented Aug 29, 2022 at 8:08
  • It can also depend. If you are running cargo build release then the node is stored within the /target/release/. If you run cargo build, then it is being stored in the /target/debug directory. But once the node is compiled, it won't generate another executable with that size unless you are compiling it on different directories.
    – andresvsm
    Commented Aug 29, 2022 at 9:46
  • @TusharGoplani you can also run the following command to see if the node weights too much or not du -sh ./*/. My /target/release directory is about 8.6GB
    – andresvsm
    Commented Aug 29, 2022 at 9:49
  • Mine is 7.1GB ... But I have two drives in my laptop C and T. In C drive windows 11, applications and ubuntu desktop application installed. And Substrate node template, parachain template are in T drive. But at the time of running nodes.. storage is getting increased of C drive........ Almost 70-80 GB storage is getting covered of C drive Commented Aug 29, 2022 at 10:14

It depends on your system and the CLI flags.

If you use the flag --base-dir <path> or -d <path>, check the <path>.

If you are on macOS, check the ~/Library/Application Support/<chain-name>.

If you are on Linux, check the ~/.local/share/<chain-name>.

Tips: if you run ./node purge-chain --chain <chain>, it will show the path to the data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.