Clean local resources
Clean Pop CLI caches, local nodes, or running networks.
Use pop clean to remove cached artifacts, stop local nodes, or shut down running networks created by Pop.
You can also run the command as pop C.
Subcommands
cache(alias:c): remove cached artifacts.node(alias:n): stop local forks,ink-node, andeth-rpcprocesses.network(alias:net): stop local networks created bypop up.
Usage
pop clean <cache|node|network> [OPTIONS] [PATH]JSON mode
Use global --json for structured output:
pop --json clean cache --all
pop --json clean node --all
pop --json clean network --allJSON mode requirements:
clean cache: requires--allclean node: requires--allor--pidclean network: requires--allorPATH
Examples
Cache cleanup
pop clean cache uses the Pop cache directory at ~/.cache/pop (or your OS equivalent).
Without
--all, Pop prompts you to select which artifacts to delete and asks for confirmation.With
--all, Pop deletes everything without confirmation.--pidis accepted but has no effect for cache cleanup.
If the cache directory does not exist or is empty, Pop prints a message and exits without changes.
Node cleanup
pop clean node looks for local ink-node, eth-rpc, and detached pop fork processes.
With
--all, Pop kills every detected process without confirmation.With
--pid, Pop validates every PID against the detected list. If any PID is invalid, Pop cancels and kills nothing.Without
--allor--pid, Pop prompts you to select processes and confirm.
Pop uses pgrep, lsof, and kill -9 for detection and shutdown.
If you started a detached fork with pop fork --detach, you can stop it with pop clean node --pid <PID>.
Network cleanup
pop clean network stops networks created by Pop using Zombienet configs.
If you provide a
PATH, it must be azombie.jsonfile or a directory containingzombie.json.With
--all, Pop stops all discovered networks without prompting.Without
PATHor--all, Pop searches your temp directory forzombie-<uuid>/zombie.jsonentries (skipping any marked with.CLEARED) and prompts you to select and confirm.With
--keep-state, Pop stops the network but keeps its state on disk and writes a.CLEAREDmarker.
pop clean network requires the chain feature. If you installed a contract-only build, this subcommand fails with: network cleanup requires the \chain` feature`.
Errors and constraints
Missing
zombie.jsonpath: the path must point tozombie.jsonor a directory that contains it.Missing cache directory or empty cache: Pop exits without making changes.
Last updated