---
title: "Release 2.7 | SurrealDB"
description: "SurrealDB 2.7.0 makes REMOVE NAMESPACE and REMOVE DATABASE return straight away, however much data they remove, and deletes that data in the background. It…"
url: https://surrealdb.com/releases/2.7
---

# SurrealDB 2.7

[Latest patch: 2.7.0](https://surrealdb.com/releases/2.7#release-2-7-0) [All releases](https://surrealdb.com/releases)

**Patches.** 1 patch release on the 2.7 line, with the release date and full notes for each below.

**Latest.** 2.7.0, released Sep 28, 2026, is the newest patch release on this line and the first set of notes below.

**Stable.** Ready for production, with every patch's release date and full notes below, newest first.

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

Back to top

[Version 2.7.0](https://surrealdb.com/releases/2.7#release-2-7-0)

[🧹 Remove a namespace or database of any size](https://surrealdb.com/releases/2.7#2-7-0--remove-a-namespace-or-database-of-any-size)

[Home](https://surrealdb.com/)

[Releases](https://surrealdb.com/releases)

2.7

SurrealDB 2.7.0 makes REMOVE NAMESPACE and REMOVE DATABASE return straight away, however much data they remove, and deletes that data in the background. It…

[Newer release line available: 3.0 →](https://surrealdb.com/releases/3.0)

Released Sep 28, 2026

## 2.7.0

SurrealDB 2.7.0 makes `REMOVE NAMESPACE` and `REMOVE DATABASE` return straight away, however much data they remove, and deletes that data in the background. It also fixes `COUNT` indexes, which the 2.x line never compacted, and stops databases without a changefeed from recording changefeed timestamps.

A 2.6 datastore upgrades in place. Read the [2.6 to 2.7 upgrade guide](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/26-to-27) before upgrading, because a datastore that has run 2.7.0 cannot safely return to 2.6.

2.7.0 contains no security fixes, and the advisories fixed in 3.3.0 list 2.x releases as affected too. See Security below.

## Highlights

### 🧹 Remove a namespace or database of any size

`REMOVE NAMESPACE` and `REMOVE DATABASE` now delete the definition and return at once, and a background task deletes the data afterwards in batches that resume after a restart. On 2.6, removing a large database could fail with `Failed to commit transaction due to a read or write conflict` or never finish. Once every node runs 2.7.0, the removed data cannot be read from the moment the statement commits, and `--reclaim-interval` (`SURREAL_RECLAIM_INTERVAL`, default `60s`) sets how often the task runs.

[Behaviour after removal](https://surrealdb.com/docs/reference/query-language/statements/remove#behaviour-after-removal) · [Removal in the background](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/26-to-27#removal-runs-in-the-background)

## Improvements

- **Changefeeds only track the databases that use them.** A database that defines no changefeed no longer records a timestamp at every changefeed clean-up (every 10 seconds by default), and the timestamps it recorded on earlier 2.x releases are deleted after the upgrade. [Background work after the upgrade](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/26-to-27#background-work-after-the-upgrade)
- **Background clean-up commits in batches.** Changefeed clean-up and index compaction now commit 1,000 keys at a time, so a large backlog no longer runs as one transaction.
- **`Config::reclaim_interval` in the Rust SDK** sets the reclaim interval for an embedded datastore.

## Bug fixes

- Fixed `COUNT` indexes never being compacted since they were added in 2.4.0, so a count served by the index read one entry for every record ever created or deleted on the table. The first compaction after the upgrade combines those entries. [Background work after the upgrade](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/26-to-27#background-work-after-the-upgrade)
- Fixed `SHOW CHANGES ... SINCE <datetime>` failing with an internal error when the datetime was earlier than the first timestamp the database had recorded. It now returns the changes from the start of what is retained, and a datetime in the future returns none.

## Security

2.7.0 contains no security fixes. Several advisories fixed in 3.3.0, three of them rated Critical, list every release before 3.3.0 as affected, and that includes 2.7.0. Their fixes ship in 3.3.0, and the [3.3.0 security notes](https://surrealdb.com/releases/3.3#3-3-0-security) list each advisory. Moving from 2.x to 3.x follows the [2.x to 3.x migration guide](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/2x-to-3x).

## Upgrade notes

The [2.6 to 2.7 upgrade guide](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/26-to-27) covers each of these in detail.

- **Back up the whole datastore first if you may need to roll back.** 2.6 does not know that a removal can leave data on disk, so it can serve a removed database's data again and let its users sign in. The way back to 2.6 is a backup taken before the upgrade: a storage snapshot, or an export of every database plus a record of the root and namespace-level users and access methods, which no export contains. [Rolling back to 2.6](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/26-to-27#rolling-back-to-26)
- **Rolling upgrades.** Until every node runs 2.7.0, a 2.6 node can still serve the data of a namespace or database removed on an upgraded node, so remove namespaces and databases only after the last node is upgraded. [Clusters and rolling upgrades](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/26-to-27#clusters-and-rolling-upgrades)
- **Reusing a removed name deletes what is left first.** Defining a namespace or database under the name of one still being deleted clears up to 10,000 keys of the old data in the same transaction. If more is left, the statement fails with `The name '...' cannot be reused until the data of the removed namespace or database has been reclaimed`, and succeeds once the background task has caught up. [Reusing a removed name](https://surrealdb.com/docs/build/migrating/from-old-surrealdb-versions/26-to-27#reusing-a-removed-name)
- **Every removal deletes stored versions.** Removing a namespace or database now deletes its version history, as `AND EXPUNGE` did, and `AND EXPUNGE` returns before the data is deleted.

Upgrade or install

## Get SurrealDB v2.7.0

Upgrade a Cloud instance from SurrealDB Studio, or copy the command for your platform.

SurrealDB Cloud

macOS

Linux

Windows

Docker

Already installed

Upgrade a Cloud instance to v2.7.0 in four steps:

1. Open [SurrealDB Studio](https://studio.surrealdb.com/current/instances)
2. Select your organisation and instance
3. On the dashboard, select “Upgrade”
4. The instance updates and restarts automatically

[Full install guide](https://surrealdb.com/surrealdb/install)

Every release line

### [All releases](https://surrealdb.com/releases)

Newer release line

### [3.0](https://surrealdb.com/releases/3.0)

Updated Mar 27, 2026

Older release line

### [2.6](https://surrealdb.com/releases/2.6)

Updated Mar 24, 2026

GET STARTED

## Start building with SurrealDB. The database and memory for every agent, from object storage up.

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Learn more](https://surrealdb.com/docs/what-is-surrealdb)

![ISO 27001](https://surrealdb.com/assets/static/iso.BzQy4FFy.svg)

![AICPA SOC 2 Type 2](https://surrealdb.com/assets/static/aicpa-soc.CE_YjqhK.svg)

![Cyber Essentials](https://surrealdb.com/assets/static/cyber-essentials.CtbmbYfL.svg)

![GDPR](https://surrealdb.com/assets/static/gdpr.IadR7loS.svg)

![Cyber Essentials Plus](https://surrealdb.com/assets/static/cyber-essentials-plus.Cl5P05xe.svg)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Releases","item":"https://surrealdb.com/releases"},{"@type":"ListItem","position":3,"name":"2.7","item":"https://surrealdb.com/releases/2.7"}]}
```

```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"SurrealDB 2.7 release notes","description":"SurrealDB 2.7.0 makes REMOVE NAMESPACE and REMOVE DATABASE return straight away, however much data they remove, and deletes that data in the background. It…","datePublished":"2026-09-28T00:00:00.000Z","dateModified":"2026-09-28T00:00:00.000Z","url":"https://surrealdb.com/releases/2.7","mainEntityOfPage":{"@type":"WebPage","@id":"https://surrealdb.com/releases/2.7"},"author":{"@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com"},"publisher":{"@type":"Organization","name":"SurrealDB","logo":{"@type":"ImageObject","url":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg"}},"about":{"@type":"SoftwareApplication","name":"SurrealDB","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, macOS, Windows","softwareVersion":"2.7"}}
```

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://surrealdb.com/#organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is a database for every agent. It starts on its first query, scales to zero when idle, speaks PostgreSQL and MySQL, and remembers in one query.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","AI agent database","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```
