# Can't update Codex on Sprite

**URL:** <https://community.fly.io/t/cant-update-codex-on-sprite/27968>\
**Category:** Questions / Help\
**Tags:** sprites\
**Created:** [May 28, 2026, 7:42pm UTC](https://community.fly.io/t/cant-update-codex-on-sprite/27968 "2026-05-28T19:42:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![afternoon](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/afternoon/32/47439_2.png) [@afternoon](https://community.fly.io/u/afternoon)\
**Post date:** [May 28, 2026, 7:42pm UTC](https://community.fly.io/t/cant-update-codex-on-sprite/27968/1 "2026-05-28T19:42:20Z")

</div>

I’m trying to run codex on a Sprite. The current version is outdated (v0.118.0), but updating doesn’t seem to work. I’ve tried Codex’s own update routine, and invoking the update directly - `npm install -g @openai/codex`. Neither work because codex is installed to `.local/bin` instead of the global NPM location.

What’s the recommended way to update?

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [May 28, 2026, 7:44pm UTC](https://community.fly.io/t/cant-update-codex-on-sprite/27968/2 "2026-05-28T19:44:03Z")

</div>

> [@afternoon](#):
>
> Neither work

Does the npm install succeed? I wonder if you can install the latest version using NPM, then change the system path to point to the newer one.

---

<div class="post-metadata">

**Author:** ![afternoon](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/afternoon/32/47439_2.png) [@afternoon](https://community.fly.io/u/afternoon)\
**Post date:** [May 28, 2026, 7:59pm UTC](https://community.fly.io/t/cant-update-codex-on-sprite/27968/3 "2026-05-28T19:59:31Z")

</div>

It does succeed and installs to `/.sprite`. Running that version of codex works fine. So yes, you’re right, I can update the paths to point to that.

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [May 28, 2026, 8:25pm UTC](https://community.fly.io/t/cant-update-codex-on-sprite/27968/4 "2026-05-28T20:25:55Z")

</div>

Nice, I’d do that then. Or you can probably delete the old version, and then the new one will be found automatically.

I’m surprised that self-update did not work; if that actually failed (Unix exit code non-zero) then it might be worth reporting that as a bug to Codex. A binary installed to a non-standard location should be able to cope with that change.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [June 4, 2026, 8:26pm UTC](https://community.fly.io/t/cant-update-codex-on-sprite/27968/5 "2026-06-04T20:26:49Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
