Closing unused token accounts on Solana allows you to recover the rent-exempt SOL (about 0.00203928 SOL per account) locked in them. Here are several methods to close accounts:
1. Using Solana CLI (Recommended)

```bash
solana close-account <TOKEN_ACCOUNT_ADDRESS> --keypair ~/path/to/wallet.json
```
Or to close **all empty token accounts** at once:
```bash
solana close-empty-token-accounts --keypair ~/path/to/wallet.json
```
2. Using Step Finance (Web Interface)
1. Go to https://sol.gtokentool.com/walletManagement/rentRecovery
2. Connect your wallet
3. Navigate to "Token Accounts"
4. Click "Close Empty" to reclaim SOL from all empty accounts

Close account - recycle Solana
Each Token or NFT on Solana requires a certain amount of SOL as account rent when first acquired. Destroy any of your unwanted NFTs or tokens in bulk and recycle SOL rent in a few simple steps.
3. Programmatic Approach (For Developers)
javascript
const { Connection, Keypair } = require('@solana/web3.js');
const { closeAccount } = require('@solana/spl-token');
async function closeTokenAccount() {
const connection = new Connection('https://api.mainnet-beta.solana.com');
const wallet = Keypair.fromSecretKey(Uint8Array.from([ private key bytes ]));
const tokenAccount = new PublicKey('TOKEN_ACCOUNT_ADDRESS');
await closeAccount(
connection,
wallet,
tokenAccount,
wallet.publicKey, // Destination for reclaimed SOL
wallet
);
}Important Notes
- Each closed account returns ~0.00203928 SOL
- Closing requires a small transaction fee (~0.000005 SOL)
- You cannot close accounts that still hold tokens
- Some accounts may be permanently frozen (like old USDT accounts)
When to Close Accounts
✔ After swapping all tokens out of an account
✔ When cleaning up old wallets
✔ Before migrating to a new wallet
For most users, Step Finance or Solend's bulk closer are the easiest options. Developers may prefer the CLI or programmatic approach for automation.
