---
title: Change OS
url: https://docs.vultr.com/products/compute/instances/cloud-compute/management/change-os
description: Learn how to change the operating system on your existing Vultr Cloud Compute instance.
publish_date: 2024-09-23T20:19:49.822532Z
last_updated: 2026-05-26T18:42:37.578960Z
---

# How to Change the Operating System on a Vultr Cloud Compute Instance

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

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

> [!WARNING]
> Changing to a different operating system wipes all the data on your server.

=== "Vultr Console"

    1. Navigate to **Products** and click **Compute**.
    1. Click your target Vultr Cloud Compute instance to open its management page.
    1. Navigate to the **Settings** tab.
    1. Find and click **Change OS** on the left navigation menu.
    1. Click the **Choose new OS** drop-down and select a new operating system to install on the instance.
    1. Click **Change OS** to change the instance operating system.
    1. Check the **Change OS** confirmation prompt and click **Change OS** to apply the new instance changes.

=== "Vultr API"

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

        ```console
        $ curl "https://api.vultr.com/v2/instances" \
          -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 Instance** endpoint](https://www.vultr.com/api/#tag/instances/operation/update-instance) with a new `os_id` value to change the instance's operating system.

        ```console
        $ curl "https://api.vultr.com/v2/instances/{instance-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 available instances and note your target instance's ID.

        ```console
        $ vultr-cli instance list
        ```

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

        ```console
        $ vultr-cli instance os list <instance-id>
        ```

    1. Change the target instance's operating system.

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

=== "Terraform"

    1. Open your Terraform configuration for the existing Cloud Compute instance.

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

        ```terraform
        resource "vultr_instance" "cc" {
            # ...existing fields (region, plan, label, etc.)

            os_id = 1743  # Example: Ubuntu 22.04 LTS x64
        }
        ```

    1. Apply the configuration and observe the following output:

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