How to reclaim your SOL
Guide·4 min read·2 of 5
There are three ways to get locked SOL out of your token accounts. They differ in effort, cost, and trust.
Closing a token account is one instruction. Getting a hundred of them closed is a logistics problem, and that is really what separates the three approaches below.
All of them do the same thing at the protocol level: they call CloseAccount in the SPL Token program, which transfers the account's entire lamport balance to a destination you choose and removes the account from state. What differs is how much work you do, how much you pay, and how much you have to trust someone else.
Can I do it myself with the Solana CLI?
Yes, and it costs nothing beyond transaction fees. If you are comfortable in a terminal this is the most direct route, with no intermediary at all.
Start by listing what you have:
spl-token accountsThat prints every token account your wallet owns, with balances. The ones showing zero are your candidates.
To see what a given account is holding in rent:
solana rent 165165 is the byte size of a standard token account, and the command prints the rent-exempt minimum for that size.
To close a specific account:
spl-token close --address <TOKEN_ACCOUNT_ADDRESS>And to sweep the obvious cases in one go, the SPL toolchain has a garbage-collect command that closes empty accounts you are the close authority on:
spl-token gcRun spl-token close --help and spl-token gc --help before you use either in anger — the flags change between versions, and you want to know what your version does rather than what a guide from two years ago said it did.
The honest downsides: you need the Solana CLI installed and a keypair configured, which means your private key sits in a file on your machine. That is a different risk profile from a browser wallet, not automatically a better one. And gc handles the straightforward cases — accounts with leftover dust, and the other accounts that will not close, still need dealing with first.
Can my wallet do it?
Sometimes. A few wallets have added account cleanup as a built-in feature, and when your wallet offers it, that is the lowest-friction option available: no new site to trust, no new permissions, and the wallet already holds your keys.
Coverage is the catch. Support is inconsistent between wallets and between versions, the feature is often limited to plain empty SPL accounts, and Token-2022 accounts or anything with dust in it typically falls outside what the built-in flow handles. It is worth checking whether your wallet has it before looking further — you may not need a third party at all.
What does a wallet cleaner add?
Two things: it finds the accounts, and it batches them.
Finding is the boring part but it matters. A cleaner reads every token account your wallet owns, checks each one's actual lamport balance rather than assuming the standard figure, and works out which are genuinely closeable and which are exceptions. Doing that by hand across a hundred accounts is where people make mistakes.
Batching is where the real work is. A Solana transaction has a size limit, and every close instruction takes up room. Legacy and v0 transactions cap at 1,232 bytes, which in practice means somewhere in the region of twenty-odd close instructions per transaction depending on what else is in there. SIMD-0296 introduces a new v1 transaction format that raises the ceiling to 4,096 bytes, but v0 and legacy transactions keep the old limit — so the number of signatures you need depends on which format the tool builds.
That is the practical difference between tools. A wallet with two hundred empty accounts is ten-ish signatures with good batching and forty with bad batching, for identical results.
What they cost varies a lot. Fees in this category run from around 2% of the recovered SOL at the low end to 20% at the high end, usually taken from the reclaimed amount rather than charged up front. SolanaSweeper takes 10%. We are not the cheapest and we do not pretend to be — what we compete on is that you can check a wallet without connecting it, and that we do not operate our own smart contract. Whether that trade is worth it to you is a reasonable thing to weigh.
Which one should I use?
If you have a handful of accounts and a terminal, use the CLI. The amounts involved rarely justify anything more.
If your wallet has the feature built in, use that. Fewer parties, no fee.
If you have dozens or hundreds of accounts, or a mix of Token-2022 and dust, a cleaner earns its fee in saved signatures and avoided mistakes — provided you have checked it properly first.
What should I check before using any tool?
Four things, and they take a minute.
- The URL. Type it or use a bookmark. Do not arrive from an ad, a search result you did not read carefully, or a link in a message. Cloned cleaner sites exist specifically because this audience is about to sign transactions. It is the first of the mistakes that cost people SOL.
- Whether it asks for a seed phrase. Nothing legitimate ever needs one. This is not a judgement call — a request for a seed phrase means close the tab.
- What the transaction actually contains. Your wallet shows you the instructions before you sign.
CloseAccountis what you want to see.SetAuthorityon your accounts is not. What you are actually signing goes through this properly. - Whether you can see the number without connecting. Reading balances is public on-chain data and requires no wallet connection. A tool that demands a connection just to show you a figure is asking for more than the task needs.
Frequently asked questions
Do I need SOL in my wallet to close accounts?
Yes, a small amount for transaction fees — roughly 0.000005 SOL per signature. If your wallet is completely empty you cannot sign anything, which is an awkward but real chicken-and-egg problem.
Where does the reclaimed SOL go?
To a destination the close instruction specifies. Note that this is not automatically whoever paid to create the account originally — the signer chooses. Any tool acting on your behalf should be sending it to your own wallet, and you can verify that in the transaction before signing.
Can I close an account someone else created for me?
If you are the account owner, yes. Ownership is what the close instruction checks, not who paid for the account's creation.
Is there a deadline?
No. Rent-exempt accounts persist indefinitely and the deposit does not expire. See what rent actually is for why.