---
title: Change OS
url: https://docs.vultr.com/products/compute/instances/bare-metal/management/change-os
description: Learn how to reinstall or change the operating system on your Vultr Bare Metal server instance.
publish_date: 2024-09-23T20:20:23.999834Z
last_updated: 2026-05-26T18:50:21.743489Z
---

# How to Change the Operating System on a Vultr Bare Metal Instance

Changing the instance operating system wipes all data on your server and installs a new file system. This is important when changing your default operating system while maintaining your instance's IP networking information.

Follow this guide to change the operating system on a Vultr Cloud Compute instance using the Vultr Console, API, CLI, or Terraform.

=== "Vultr Console"

    1. Navigate to **Products** and click **Compute**.
    1. Click your target Bare Metal instance to open its management page.
    1. Navigate to the **Settings** tab.
    1. Click **Change OS** on the left navigation menu.
    1. Click the **OS** drop-down to select a new operating system and the default RAID configuration.
    1. Click **Change OS** to apply the new operating system.
    1. Check the confirmation prompt and click **Change OS** to reinstall the instance with a new operating system.

=== "Vultr API"

    1. Send a `GET` request to the [**List Bare Metal Instances** endpoint](https://www.vultr.com/api/#tag/baremetal/operation/list-baremetals) and note the target instance's ID.

        ```console
        $ curl "https://api.vultr.com/v2/bare-metals" \
          -X GET \
          -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `GET` request to the [**List OS** endpoint](https://www.vultr.com/api/#tag/os/operation/list-os) to view all available operating systems and note the target OS ID.

        ```console
        $ curl "https://api.vultr.com/v2/os" \
          -X GET \
          -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `PATCH` request to the [**Update Bare Metal** endpoint](https://www.vultr.com/api/#tag/baremetal/operation/update-baremetal) with a new `os_id` value to change the instance's operating system.

        ```console
        $ curl "https://api.vultr.com/v2/bare-metals/{baremetal-id}" \
          -X PATCH \
          -H "Authorization: Bearer ${VULTR_API_KEY}" \
          -H "Content-Type: application/json" \
          --data '{
            "os_id" : "<new-instance-os-id>"
          }'
        ```

=== "Vultr CLI"

    1. List all Bare Metal instances in your Vultr account and note the target instance's ID.

        ```console
        $ vultr-cli bare-metal list
        ```

    1. List all available operating systems and note the target OS ID.

        ```console
        $ vultr-cli bare-metal os list <baremetal-id>
        ```

    1. Change the target instance's operating system.

        ```console
        $ vultr-cli bare-metal os change <instance-id> --os <os_id>
        ```

=== "Terraform"

    1. Open your Terraform configuration for the existing Bare Metal instance.

    1. Update the `os_id` value in the instance resource to the new operating system.  

        ```terraform
        resource "vultr_bare_metal_server" "bm1" {
            # ...existing fields (region, plan, label, hostname, etc.)

            os_id = 2284  # New OS ID
        }
        ```

    1. Apply the configuration and observe the following output:

        ```
        Apply complete! Resources: 1 added, 0 changed, 1 destroyed.
        ```
