---
title: Roll Back a Live Update
description: Recover from a bad Live Update in your Capacitor or Cordova app with automatic and manual rollbacks in Capawesome Cloud.
---

# Roll Back a Release

A rollback reverts to a working bundle when a new one doesn't work as expected. The SDK supports **automatic** rollbacks (self-healing), and you can also roll back **manually** from the CLI or Console.

## Automatic Rollbacks

The SDK can automatically roll back to the built-in bundle shipped with the installed native app version if a new bundle fails to start. Since that bundle is guaranteed to run on the current binary, it's always a safe fallback. Configure `readyTimeout` and `autoBlockRolledBackBundles`:

=== "Capacitor"

    ```json title="capacitor.config.json"
    {
      "plugins": {
        "LiveUpdate": {
          "autoBlockRolledBackBundles": true,
          "readyTimeout": 10000
        }
      }
    }
    ```

=== "Cordova"

    ```xml title="config.xml"
    <preference name="AUTO_BLOCK_ROLLED_BACK_BUNDLES" value="true" />
    <preference name="READY_TIMEOUT" value="10000" />
    ```

`readyTimeout` is the deadline (in milliseconds): if your app doesn't call `ready()` within this window of starting, the SDK assumes the bundle is broken and reverts on the next launch. `autoBlockRolledBackBundles` prevents a rollback loop by blocking a bundle that has already triggered a rollback.

For this to work, call `ready()` as early as possible at app start — as soon as your bootstrap code has run without crashing:

=== "Capacitor"

    ```typescript
    import { LiveUpdate } from "@capawesome/capacitor-live-update";

    await LiveUpdate.ready();
    ```

=== "Cordova"

    ```javascript
    document.addEventListener("deviceready", async () => {
      await cordova.plugins.LiveUpdate.ready();
    });
    ```

## Manual Rollbacks

Roll back to a previous bundle from the CLI or Console.

=== "CLI"

    Use the [`apps:liveupdates:rollback`](../cli/commands.md#appsliveupdatesrollback) command:

    ```bash
    npx @capawesome/cli apps:liveupdates:rollback
    ```

    Select the app and channel, then choose the deployment you want to roll back to.

=== "Console"

    In the [Console](https://console.cloud.capawesome.io/){:target="_blank"}, open the channel's history page, find the deployment you want to roll back to, and click **Rollback**. A new deployment is created that points to the selected bundle.

    ![Rollback Bundle](../../assets/images/screenshots/cloud-app-bundles-rollback.png)
