# How to rollback to a previous deployment version

If errors occur after you deploy a new version of a pipeline in any environment, you can rollback to a previous version of the deployment. The rollback goes back to the previous version that was successfully deployed.&#x20;

If changes have been made in Global and Account, the rollback maintains the current version and doesn't bring back the old configuration. Here is how you can do that.

{% hint style="info" %}
To have access to **Deployment**, you must have been **assigned** the **Deployment: Read and Deployment: Create permission or role on the desired environment (test/prod)**, for your user account or for a group to which you belong.
{% endhint %}

## Select the pipeline

In the environment you want, select a pipeline that has been previously deployed. After identifying the pipeline, click on the three dots in the upper right corner of the pipeline card. Then click **Rollback** and follow the instructions that appear.

<figure><img src="/files/WPVkLgmLfYiloxsDJ6A1" alt=""><figcaption></figcaption></figure>

## Rollback

When you click **Rollback**, a pop-up window appears informing you that you will revert this deployed pipeline to the previous version in the current environment and that this action cannot be undone. After you make your choice, click **CONTINUE** to keep the action or **CANCEL** to cancel the rollback.

<figure><img src="/files/7cOb5BYVReiNDqJi6dWW" alt=""><figcaption></figcaption></figure>

If you proceed with your choice and select **CONTINUE**, the selected pipeline will be restored to its previous version in the current environment. A message is displayed at the bottom of the page stating that the rollback was successful, and you can confirm the changes in the pipeline card after it.

<figure><img src="/files/pAeBFO9kc1wAQVrN9hAU" alt=""><figcaption></figcaption></figure>

## Checking the current status of a pipeline

To track the actions made to a deployed pipeline, you can check its **History**. In the pipeline history, you can check the status and environment of each deployment. [In this article, you will learn more about how to check the history of deployed pipelines.](/documentation/developer-guide/development-cycle/overview/deployment/pipeline-deployment-history-beta-restricted.md)

You can also check the current status of a pipeline by the pipeline card, which shows whether the pipeline has already been deployed in the test environment. [To learn more about the available status on the card, read this article.](/documentation/developer-guide/development-cycle/overview/deployment/pipeline-deployment-status.md)

<br>


---

# 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.digibee.com/documentation/developer-guide/development-cycle/overview/deployment/how-to-rollback-to-a-previous-deployment-version.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.
