<p>The <code>withdraw</code> command makes an <em>onchain</em> transaction to send a given amount of <em>onchain</em> funds to the specified <code>destination</code>. It will not close any channel beforehand to withdraw funds locked there.</p>
<p>Whether or not it will sweep unconfirmed UTxOs as well is specified to the command via the <code>minconf</code> optional parameter, which can be set to <code>0</code>. See the <a href="https://lightning.readthedocs.io/lightning-withdraw.7.html" rel="nofollow noreferrer">manpage</a> for more details on the usage of the command.</p>
<p>So, yes, by default it refers only to UTxOs with the <code>status</code> field set to <code>confirmed</code> in <code>listfunds</code>. Note however that <code>withdraw &lt;addr&gt; all</code> will not sweep the reserved UTxOs (those with a <code>reserved_to_block</code> block field superior to the current block height in <code>listfunds</code>'s result).</p>

CC BY-SA 4.0
2022-01-26T12:16:27.463Z
2022-01-26T12:16:27.463Z
Antoine Poinsot
<p>Will c-lightning's <code>withdraw destination all</code> take anything from the channel funds?</p>
<p>Does the string <code>all</code> that can be  used  to specify  withdrawal of all available funds refer only to onchain funds with <code>&quot;status&quot;: &quot;confirmed&quot;</code> in <code>listfunds</code>'s result?</p>

<core-lightning><sweep>
Will c-lightning's `withdraw destination all` take anything from the channel funds?
John Smith
# Will c-lightning's `withdraw destination all` take anything from the channel funds?

(Asked by: username_0 on 2022-01-26)

Will c-lightning's `withdraw destination all` take anything from the channel funds?

Does the string `all` that can be used to specify withdrawal of all available funds refer only to onchain funds with `"status": "confirmed"` in `listfunds`'s result?

**Tags:** core-lightning, sweep


---

## 1 answers

### Answer by username_1 on 2022-01-26. Score: 2 | Accepted answer

The `withdraw` command makes an *onchain* transaction to send a given amount of *onchain* funds to the specified `destination`. It will not close any channel beforehand to withdraw funds locked there.

Whether or not it will sweep unconfirmed UTxOs as well is specified to the command via the `minconf` optional parameter, which can be set to `0`. See the [manpage](https://lightning.readthedocs.io/lightning-withdraw.7.html) for more details on the usage of the command.

So, yes, by default it refers only to UTxOs with the `status` field set to `confirmed` in `listfunds`. Note however that `withdraw <addr> all` will not sweep the reserved UTxOs (those with a `reserved_to_block` block field superior to the current block height in `listfunds`'s result).


---

