# Reinstall & Terminate

This guide covers how to reinstall your server's operating system or permanently terminate the service.

### Reinstall Operating System

Reinstalling the OS wipes the server and installs a fresh operating system while keeping the same hardware allocation.

#### When to Reinstall

* Fresh start with clean OS
* Switching to a different Linux distribution
* Recovering from corrupted system
* Testing different configurations

#### Reinstall Process

1. Navigate to **Metal** > **Services**
2. Click on the server you want to reinstall
3. Go to the **Settings** tab
4. Find the **Reinstall Operating System (OS)** section
5. Click **Reinstall OS**

#### Reinstall Options

When reinstalling, you can configure:

* **Operating System**: Choose from available distributions
* **RAID Configuration**: Reconfigure drive arrays
* **Authentication**: Set new SSH keys or password
* **Cloud-Init**: Add new first-boot scripts

#### Important Warnings

{% hint style="warning" %}
**Data Loss Warning**: Reinstalling the OS erases ALL data on the server. This includes:

* All files and directories
* All installed software
* All user accounts and configurations
* Any data on attached storage
  {% endhint %}

#### Before Reinstalling

1. **Backup Important Data**
   * Copy files to external storage
   * Export database dumps
   * Save configuration files
2. **Document Your Setup**
   * Installed packages
   * Network configuration
   * Cron jobs and services
3. **Notify Stakeholders**
   * Inform team members
   * Plan for downtime

#### Reinstall Timeline

Reinstallation follows the same process as initial deployment:

1. Machine Allocated (immediate, already assigned)
2. Deployment Started
3. Installing OS
4. Configuring System
5. Deployment Complete

Typical time: 5-15 minutes

### Terminate Service

Terminating a service permanently deletes the metal server and stops all billing.

#### When to Terminate

* Server no longer needed
* Migrating to different hardware
* Reducing costs
* Decommissioning environment

#### Terminate Process

1. Navigate to **Metal** > **Services**
2. Click on the server you want to terminate
3. Go to the **Settings** tab
4. Find the **Terminate Instance** section
5. Click **Terminate**
6. Confirm the termination in the dialog

#### What Happens When You Terminate

* **Immediately**: Server is marked for termination
* **Within Minutes**: Server is powered off
* **Hardware Released**: Hardware returned to pool
* **Billing Stops**: Charges stop accruing
* **Data Destroyed**: All data is permanently erased

#### Important Warnings

{% hint style="danger" %}
**This action cannot be undone**. Once you terminate a service:

* All data is permanently lost
* IP addresses are released
* The server cannot be recovered
* You must deploy a new server if needed again
  {% endhint %}

\### Before Terminating

1. **Backup Everything**
   * Download all important files
   * Export databases
   * Save configuration for recreation
2. **Update DNS**
   * Point domain records elsewhere
   * Update any hardcoded IPs
3. **Notify Dependencies**
   * Update services that connect to this server
   * Inform team members
4. **Check IP Block Attachments**
   * IP blocks attached to this server will be detached
   * Decide whether to keep or release IP blocks

#### After Termination

* Server appears as "Terminated" in the list (briefly)
* Then removed from your services list
* Final invoice reflects usage up to termination
* IP addresses become available for reassignment

### Orders and Work Orders

When you initiate a reinstall or terminate action, it creates an order:

* View pending orders at **Orders** page
* Track work order progress
* See status (Open, Completed, Cancelled)

#### Order Actions

From the Orders page, you can:

* **View Work Orders**: See detailed progress
* **Go to Service**: Navigate to the affected server
* **Cancel Order**: Cancel pending orders (if not yet started)

### Best Practices

#### Before Any Destructive Action

1. Double-check you have the right server selected
2. Verify backups are complete and accessible
3. Communicate with your team
4. Choose appropriate timing (maintenance window)

#### Maintaining Service Continuity

For production workloads:

1. Deploy replacement server first
2. Migrate data and services
3. Update DNS/load balancers
4. Test thoroughly
5. Then terminate old server

#### Cost Optimization

* Terminate unused servers promptly
* Consider Reserved pricing for long-running servers
* Monitor the Orders page for stuck provisioning


---

# 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.teraswitch.com/compute/metal/reinstall-terminate.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.
