# Is there a minimum cycle amount required to delete a canister from mainnet?

**URL:** <https://forum.dfinity.org/t/is-there-a-minimum-cycle-amount-required-to-delete-a-canister-from-mainnet/30076>\
**Category:** Command Line Tools\
**Created:** [April 27, 2024, 7:12pm UTC](https://forum.dfinity.org/t/is-there-a-minimum-cycle-amount-required-to-delete-a-canister-from-mainnet/30076 "2024-04-27T19:12:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![theoman42](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/theoman42/32/23829_2.png) [@theoman42](https://forum.dfinity.org/u/theoman42)\
**Post date:** [April 27, 2024, 7:12pm UTC](https://forum.dfinity.org/t/is-there-a-minimum-cycle-amount-required-to-delete-a-canister-from-mainnet/30076/1 "2024-04-27T19:12:11Z")

</div>

Here is the error I am getting. I simply created a boiler plate Motoko, React, II app, deployed it to mainnet, and want to delete and refund my cycles. Not sure what to do about the error below.

```auto
Installing temporary wallet in canister test_1_frontend to enable transfer of cycles.
Attempting to transfer 2980877079427 cycles to canister 3a2fd-paaaa-aaaap-abnna-cai.
Error: Failed to delete canister 'test_1_frontend'.
Caused by: Failed to delete canister 'test_1_frontend'.
  Failed to deposit 2980877079427 cycles into 3a2fd-paaaa-aaaap-abnna-cai.
    Failed to call update function 'deposit_cycles' regarding canister '3a2fd-paaaa-aaaap-abnna-cai'.
      Update call using wallet failed.
        The replica returned a rejection error: reject code CanisterError, reject message Canister 3slll-lyaaa-aaaap-ahdpa-cai is out of cycles, error code None

```

---

<div class="post-metadata">

**Author:** ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)\
**Post date:** [April 28, 2024, 10:45pm UTC](https://forum.dfinity.org/t/is-there-a-minimum-cycle-amount-required-to-delete-a-canister-from-mainnet/30076/2 "2024-04-28T22:45:31Z")

</div>

Assuming that you are using `dfx canister delete canister_name --network ic` within the project root (where `dfx.json`) to delete the canister on `mainnet`:

1. What is the version that you are using?

2. Can you please run `dfx wallet balance --network ic` and advise how many cycles you have?

I just want to know to confirm if you do not have enough cycles or if you need to update your dfx (there was a known bug and a release is coming soon).
