# 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);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hypertensor.org/network/subnet-node/deactivate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
