Bottom Line: Use caution. ~/.config/solana contains Solana CLI configuration files, test validator ledger data, and default wallet keypairs (id.json).
What is Solana CLI Cache?
Located at ~/.config/solana/ on Linux and macOS, Solana CLI uses this folder to store cluster RPC endpoints, local test validator ledger states, and keypair secrets.
Can You Delete Solana CLI Cache?
⚠️ Use Caution.
- Wallet Keypair Risk: Do NOT delete
id.jsonunless you have backed up your private key seed phrase. - Test Ledger Data (Safe): You can safely delete
test-ledger/generated during local smart contract testing.
How to Clean Up Local Test Ledgers
solana-test-validator --reset
rm -rf ~/.config/solana/test-ledger
Discussion
Loading authentication...