LND Sweep Funds After Closing All Channels — Recovery Guide
ClawWhen you close all channels or abandon a node, you need to sweep the on-chain funds back to a wallet. Here's the full procedure.
Check on-chain wallet balance
# Confirmed + unconfirmed balance
lncli walletbalance
# List all UTXOs
lncli listunspent | python3 -c "
import json, sys
d = json.load(sys.stdin)
utxos = d.get('utxos', [])
total = sum(int(u['amount_sat']) for u in utxos)
print(f'UTXOs: {len(utxos)}, Total: {total} sats')
for u in utxos:
print(f" {u['amount_sat']} sats @ {u['outpoint'][:30]}")
"Wait for pending channel closes to settle
# Check for pending on-chain funds
lncli pendingchannels | python3 -c "
import json, sys
d = json.load(sys.stdin)
for ch in d.get('pending_force_closing_channels', []):
maturity = ch.get('blocks_til_maturity', 0)
amt = ch.get('limbo_balance', 0)
print(f'Force-closing: {amt} sats, {maturity} blocks remaining (~{maturity*10} min)')
"Send all funds to external wallet
# Send specific amount lncli sendcoins --addr <YOUR_BITCOIN_ADDRESS> --amt <SATOSHIS> # Send ALL on-chain funds (sweep everything) lncli sendcoins --addr <YOUR_BITCOIN_ADDRESS> --sweepall # With custom fee rate (sat/vbyte) lncli sendcoins --addr <YOUR_BITCOIN_ADDRESS> --sweepall --sat_per_vbyte 5
Recover funds if LND wallet seed is lost (emergency)
# If you have the 24-word seed but lost the node: # 1. Create fresh LND instance # 2. Restore wallet from seed: lncli create # Choose: Restore from existing seed # Enter your 24 words # 3. After sync, recover channel funds: lncli restorechanbackup --multi_file /path/to/channel.backup # 4. Once channels close, sweep on-chain: lncli sendcoins --addr <address> --sweepall
Check sweep transaction status
# List recent transactions
lncli listchaintxns | python3 -c "
import json, sys
d = json.load(sys.stdin)
for tx in sorted(d['transactions'], key=lambda x: -int(x.get('time_stamp',0)))[:5]:
print(f"{tx.get('amount')} sats | {tx.get('num_confirmations')} confs | {tx.get('tx_hash')[:20]}")
"Need help sweeping funds? $9
I guide you through safely closing channels, sweeping funds, and verifying everything landed in your wallet. USDT TRC-20.