[Bug] Standalone self-updater never deletes old releases, consuming 3.8 GiB

Resolved 💬 1 comment Opened Aug 27, 2026 by nnayz Closed Aug 27, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.149.1

### What subscription do you have?

Not relevant to this issue.

### Which model were you using?

Not relevant to this issue.

### What platform is your computer?

  • macOS 26.5.2 (Build 25F84)
  • Apple Silicon / arm64

### What terminal emulator and version are you using?

Not relevant to this issue.

### What issue are you seeing?

The standalone Codex self-updater installs each new version under:

```text
~/.codex/packages/standalone/releases/

It updates the current symlink correctly, but it does not delete superseded
release directories.

Before manually cleaning the directory, my installation contained 15 complete
releases ranging from 0.138.0 through 0.149.1:

0.138.0-aarch64-apple-darwin
0.139.0-aarch64-apple-darwin
0.141.0-aarch64-apple-darwin
0.142.0-aarch64-apple-darwin
0.142.3-aarch64-apple-darwin
0.142.5-aarch64-apple-darwin
0.143.0-aarch64-apple-darwin
0.144.1-aarch64-apple-darwin
0.144.6-aarch64-apple-darwin
0.145.0-aarch64-apple-darwin
0.146.0-aarch64-apple-darwin
0.147.0-aarch64-apple-darwin
0.148.0-aarch64-apple-darwin
0.149.0-aarch64-apple-darwin
0.149.1-aarch64-apple-darwin

The active release was:

0.149.1-aarch64-apple-darwin

The current symlink correctly pointed to that version.

The release directory occupied approximately 3.8 GiB. Fourteen superseded
releases consumed approximately 3.6 GiB, with each update adding roughly 200–
310 MiB.

Is retaining every previous release intentional? If it exists for rollback
purposes, an unlimited retention policy seems unnecessary and can cause
substantial storage growth over time.

### What steps can reproduce the bug?

  1. Install Codex using the standalone installer.
  2. Allow Codex to self-update across multiple versions.
  3. Inspect the standalone releases directory:

du -sh ~/.codex/packages/standalone/releases
ls ~/.codex/packages/standalone/releases

  1. Observe that every previous release remains installed after successful

updates.

  1. Confirm that current points only to the latest release:

readlink ~/.codex/packages/standalone/current

### What is the expected behavior?

After a new release has been installed successfully, verified, and selected by
the current symlink, the updater should prune superseded installer-owned
releases.

A reasonable retention policy might be:

  • Keep the active release.
  • Optionally keep one previous release for rollback.
  • Delete releases older than those.
  • Treat cleanup failures as warnings rather than failing an otherwise

successful update.

If retaining all releases is intentional, the behavior should be documented
and Codex should provide a supported cleanup command.

### Additional information

I manually removed the fourteen superseded release directories while
preserving 0.149.1.

After cleanup:

  • The current symlink remained valid.
  • codex --version still returned codex-cli 0.149.1.
  • Codex continued working normally.
  • Approximately 3.6 GiB was recovered.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 12 hours ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #39871

Powered by Codex Action