user2080: I have several utxos in my cardano wallet address created via the cardano-cli that have 1-4 ADA each. Some utxos have an NFT associated with them. Is there a way to spend the rest of several utxos in one transaction? Is there a way to combine several utxos?
I created the wallet using the cli using the following commands:
cardano-cli address key-gen --verification-key-file payment.vkey --signing-key-file payment.skey

cardano-cli address build --payment-verification-key-file payment.vkey --out-file payment.addr --mainnet


user382: In your build command specify multiple txins and one txout with the sum of all the Ada and tokens from spent utxos.

user5394: I wanted to elaborate on Samuel's answer to be more details. Let's say you are building a transaction that looks like the following:
cardano-cli transaction build-raw \
--tx-in <TxHash>#<TxIx> \
--tx-out <payment.addr>+<change> \
--tx-out <destinationAddress>+0 \
--invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee 0 \
--out-file tx.tmp

All you have to do is create more --tx-in options. Make sure you calculate the total ada in all --tx-in options to correctly calculate the change output for the single tx-out. Something of the pattern below would work using 3 --tx-in arguments.
cardano-cli transaction build-raw \
--tx-in <TxHash>#<TxIx> \
--tx-in <TxHash>#<TxIx> \
--tx-in <TxHash>#<TxIx> \
--tx-out <payment.addr>+<totalchange> \
--tx-out <destinationAddress>+0 \
--invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee 0 \
--out-file tx.tmp

Lastly, remember that the utxo must balance out to zero so
all the utxos with ada your are using must equal the fee plus how much ada you are sending plus how much change you have in your one combined utxo left over

2080: <p>I have several utxos in my cardano wallet address created via the cardano-cli that have 1-4 ADA each. Some utxos have an NFT associated with them. Is there a way to spend the rest of several utxos in one transaction? Is there a way to combine several utxos?</p>
<p>I created the wallet using the cli using the following commands:</p>
<pre><code>cardano-cli address key-gen --verification-key-file payment.vkey --signing-key-file payment.skey

cardano-cli address build --payment-verification-key-file payment.vkey --out-file payment.addr --mainnet
</code></pre>
 382: <p>In your build command specify multiple txins and one txout with the sum of all the Ada and tokens from spent utxos.</p>
 5394: <p>I wanted to elaborate on Samuel's answer to be more details. Let's say you are building a transaction that looks like the following:</p>
<pre><code>cardano-cli transaction build-raw \
--tx-in &lt;TxHash&gt;#&lt;TxIx&gt; \
--tx-out &lt;payment.addr&gt;+&lt;change&gt; \
--tx-out &lt;destinationAddress&gt;+0 \
--invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee 0 \
--out-file tx.tmp
</code></pre>
<p>All you have to do is create more --tx-in options. Make sure you calculate the total ada in all --tx-in options to correctly calculate the change output for the single tx-out. Something of the pattern below would work using 3 --tx-in arguments.</p>
<pre><code>cardano-cli transaction build-raw \
--tx-in &lt;TxHash&gt;#&lt;TxIx&gt; \
--tx-in &lt;TxHash&gt;#&lt;TxIx&gt; \
--tx-in &lt;TxHash&gt;#&lt;TxIx&gt; \
--tx-out &lt;payment.addr&gt;+&lt;totalchange&gt; \
--tx-out &lt;destinationAddress&gt;+0 \
--invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee 0 \
--out-file tx.tmp
</code></pre>
<p>Lastly, remember that the utxo must balance out to zero so
all the utxos with ada your are using must equal the fee plus how much ada you are sending plus how much change you have in your one combined utxo left over</p>
