This question already has an answer here:

In the desktop wallet you can send your entire balance but clicking the "All" button which puts (all) in the amount. Is there a way to do the same thing in the command line client?

marked as duplicate by dEBRUYNE, 254123179 Apr 29 '18 at 8:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Kind of duplicate of that ^ question. – dEBRUYNE Apr 28 '18 at 11:20

You can use the sweep_all command. It will send the full balance, minus the fee needed for that transaction. For example:

sweep_all 4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

See help in monero-wallet-cli for full command syntax.

Not the answer you're looking for? Browse other questions tagged or ask your own question.