How can I delete my canister after I create it

I created canister and install the code
dfx canister create hello --network ic

dfx.json is empty
{ "canisters": { "hello": {} } }

But I cannot delete it any ways. Need Help!!!

dfx canister status hello --network ic
WARN: The cold identity is not stored securely. Do not use it to control a lot of cycles/ICP. Create a new identity with dfx identity new and use it in mainnet-facing commands with the --identity flag
Canister status call result for hello.
Status: Stopped
Controllers: mi3ph-wiaaa-aaaao-aajpq-cai neojv-sgvlg-dv4vu-yfv4s-ion4u-on3th-r44xg-2b6dc-2doro-fvaox-sqe
Memory allocation: 0
Compute allocation: 0
Freezing threshold: 2_592_000
Memory Size: Nat(2275598)
Balance: 2_926_247_274_069 Cycles
Module hash: 0x6563191a3e657bd3f3c40cbbe849e83e8b3eaecf87546ebce32f5259650f1433

dfx canister delete hello --network ic
WARN: The cold identity is not stored securely. Do not use it to control a lot of cycles/ICP. Create a new identity with dfx identity new and use it in mainnet-facing commands with the --identity flag
WARN: The cold identity is not stored securely. Do not use it to control a lot of cycles/ICP. Create a new identity with dfx identity new and use it in mainnet-facing commands with the --identity flag
Beginning withdrawal of cycles to canister mi3ph-wiaaa-aaaao-aajpq-cai; on failure try --no-wallet --no-withdrawal.
Setting the controller to identity principal.
Error: Failed to delete canister ‘hello’.
Caused by: Failed to delete canister ‘hello’.
Failed to update settings for srbgg-giaaa-aaaao-a27na-cai.
Failed to call update function ‘update_settings’ regarding canister ‘srbgg-giaaa-aaaao-a27na-cai’.
Update call (without wallet) failed.
The replica returned a replica error: Replica Error: reject code CanisterError, reject message Cannot increase memory allocation to 8.00 GiB due to its reserved cycles limit. The current limit (5_000_000_000_000) would be exceeded by 201_308_827_942_748., error code None

1 Like

Can you try to dfx canister uninstall-code --network ic hello and then delete? I wonder if it has something to do with the memory size, although that looks very normal

2 Likes

@skyhigh: your canister is on subnet Subnet: o3ow2-2ipam-6fcjo-3j5vt-fzbge-2g7my-5fz2m-p4o2t-dwlc4-gt2q7-5ae - ICP Dashboard which has high storage usage. That’s why operations that allocate more storage/memory require cycle reservation.

We are working with Hot or Not to reduce storage usage on that subnet: Voting for a new IC release - be69c35 - #7 by ulan

2 Likes

Also, this should help. It will be included in the next dfx release

1 Like