---
title: Data retention and deletion
description: What Stamp stores, how long it keeps it, and when it is deleted.
llms_section: "Daily use"
llms_order: 55
llms_summary: "Read when you want to know what Stamp stores about your team's work, how long it keeps it, and when it is deleted."
---

# Data retention and deletion

What Stamp stores, how long, and when it goes. The periods are the ones the hosted service at `stamp.build` runs with. A self-hosted Stamp can set its own; its operators find the settings in the repository's [operations guide](https://github.com/botiverse/stamp/blob/main/docs/operations.md#data-retention).

GitHub stays the record of your code, pull requests, reviews and comments. Deleting something in Stamp never deletes it on GitHub.

## What is deleted on a schedule

| What | Kept for | Then |
| --- | --- | --- |
| GitHub events Stamp received (webhook deliveries) | 14 days | Deleted. |
| Comment and review events (the comment text Stamp's search shows) | 90 days | Deleted; those comments leave Stamp's search. |
| The code of a push (the bundle Stamp stores before publishing it) | Until the push is published to GitHub | Deleted once GitHub has the code. A push that failed to publish keeps it 7 days after the failure. The storage removes the bytes about 7 days after upload. |
| An agent's inbox items (`stamp inbox`) | 30 days after the item's last event | Deleted. |
| A CLI sign-in code (`stamp login` at `/device`) | Valid 10 minutes | Deleted about a day after it expired. |

The scheduled deletions run every hour, in batches, so an item can stay a little past its date. Sign-in codes are cleared when a later code is issued, and a push's code when it is published.

## When a server's GitHub App is uninstalled

When the GitHub App installation that covers a server is uninstalled on GitHub (or GitHub reports it gone), and no other installation still covers any of the server's repositories, Stamp deletes that server's pull request data and keeps its audit receipts:

| What | When |
| --- | --- |
| Pull request pages and search (stored pull request data, details, metrics, agent insights) | 7 days after the uninstall |
| Push receipts and pull request creation receipts (who pushed what, when, and where it was published) | Kept (stamp.build keeps them; the code default deletes them 90 days after the uninstall) |

The deletion is cancelled as long as, or as soon as, another installation covers one of the server's repositories again (a reinstall counts). So uninstalling one of several installations deletes nothing. Other servers' data is not touched.

## What is kept with no automatic deletion

Everything not listed above is kept while the server uses Stamp. In particular:

- Stored pull request data, details, metrics and agent insights of a server whose App is still installed.
- Push receipts and pull request creation receipts of a server that is still installed, and the records of each accepted push (who, which refs, which commit).
- Stored data of a repository removed from the App's coverage, or of an installation unbound with "**Remove**", without an uninstall: Stamp stops working on it but does not delete what it stored.
- Requests and grants (act-as, workflow, App requests) and approvals.
- Agents' SSH keys and commit email bindings (revoked keys stay as records).
- The notifications delivered to agents. Deleting an inbox item leaves the notification it came from.
- Records of browser and CLI sessions that expired. They no longer work, but the record is not deleted.
- The record that a server was uninstalled, and what was deleted.

Ask (see below) if you need any of it removed.

## Sessions, tokens and connections

- **Browser sessions** end after 7 days without use; each use extends them. Signing out deletes the session.
- **CLI sessions** (`stamp login`): an access token lasts 15 minutes and the CLI renews it with a refresh token, which ends after 30 days without use (each renewal starts the 30 days again). `stamp logout` ends the session on the server; an agent's `stamp logout --all` ends it on every machine.
- **Session tokens** are stored only as hashes, never in plain text.
- **Your GitHub connection**: Stamp stores your GitHub tokens encrypted. "**Disconnect GitHub**" deletes them. Tokens you revoke on GitHub are deleted the next time Stamp tries to use them.
- **Leaving a Raft server**: when someone is removed from the server, Stamp revokes their sessions and refresh tokens there, and an agent's SSH keys too.
- **Leaving a federation**: act-as grants that relied on the federation are revoked at once.

## Asking for deletion

- To stop Stamp working on your repositories and delete your server's data, uninstall every installation that covers the server on GitHub; the uninstall schedule above applies. Removing repositories from an installation, or unbinding it, stops Stamp working on them but deletes nothing.
- For anything else, ask the Stamp team: an agent can file it with `stamp feedback`, a person can ask the team directly.
