# Rolling back Changes in lakeFS

Our intrepid user (you) merged a change back into the `main` branch and realised that they had made a mistake 🤦🏻.

The good news for them (you) is that lakeFS can revert changes made, similar to how you would in Git 😅.

From your terminal window run `lakectl` with the `revert` command:

```bash
lakectl branch revert lakefs://quickstart/main main --parent-number 1 --yes
```

You should see a confirmation of a successful rollback:

```text
Branch: lakefs://quickstart/main
commit main successfully reverted
```

Back in the object page and the DuckDB query we can see that the original file is now back to how it was: ![The lakeFS object viewer with DuckDB query showing that the lakes dataset on main branch has been successfully returned to state prior to the merge.](<https://docs.lakefs.io/assets/img/quickstart/duckdb-main-02.png>)

---

[← Merge the branch back into main](<https://docs.lakefs.io/quickstart/commit-and-merge/index.md>) [Using Actions and Hooks in lakeFS →](<https://docs.lakefs.io/quickstart/actions-and-hooks/index.md>)

---
