2

I have a program that I want to shut down and recover the SOL from. There are two addresses associated with the program, the program itself and the address of the executable data.

If i do:

solana program close BLA

using the CLI, and pass the program address (not the address of the executable data) will this recover the SOL present in the executable data account as well?

Many Thanks

1 Answer 1

2

To put this quickly, yes! Here's an example flow against a test validator:

$ solana balance
500000000 SOL
$ solana program deploy spl_token_2022.so
Program Id: 5WTTsc3ySvMxRJ1zTgrV9F6p7rnEA7anZGh4ivW5jQfz
$ solana balance
499999980.753141761 SOL
$ solana program close --bypass-warning 5WTTsc3ySvMxRJ1zTgrV9F6p7rnEA7anZGh4ivW5jQfz

Closed Program Id 5WTTsc3ySvMxRJ1zTgrV9F6p7rnEA7anZGh4ivW5jQfz, 19.2388668 SOL reclaimed
$ solana balance
499999999.99200356 SOL

More info at https://docs.solana.com/cli/deploy-a-program#closing-program-and-buffer-accounts-and-reclaiming-their-lamports

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.