Delete
Beginner
Concept
If you want to permanently delete a specific canister or all canisters for a project, you can use the dfx canister delete <canister-name>
command.
Deleting a canister permanently removes its code and state. This action cannot be undone and once the canister is deleted, its ID cannot be reused. Before you can delete a canister, you must first stop the canister using dfx canister stop <canister-name>
to clear any pending message requests or replies.
Errors related to canister deletion
Common errors related to canister deletion include: