> For the complete documentation index, see [llms.txt](https://docs.hypertensor.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hypertensor.org/network/subnet-node/deactivate.md).

# Deactivate

Nodes can temporarily deactivate themselves up to the `MaxDeactivationEpochs`. Only nodes that are [classified](#classifications) as Validators can deactivate; otherwise, the node must remove itself. Deactivations must last at least one epoch.

```rust
pub fn deactivate_subnet_node(
    origin: OriginFor<T>, 
    subnet_id: u32, 
    subnet_node_id: u32,
)
```

#### Inserted & Updated Storage

```rust
...
SubnetNodesData::<T>::take(subnet_id, subnet_node_id)
...

DeactivatedSubnetNodesData::<T>::insert(subnet_id, subnet_node.id, subnet_node);

TotalSubnetNodes::<T>::mutate(subnet_id, |n: &mut u32| *n -= 1);
```
