1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenAI Codex CLI をバージョンアップ & アンインストール

Last updated at Posted at 2025-08-28

OpenAI Codex CLI は、AI を活用したコード生成や補完をコマンドラインから扱える便利なツールです。

バージョンアップごとに、魅力的な機能が追加されているので嬉しくなりますね。

さて、最新のcodex CLIを使おうと思ったら、アップデート方法がわからなかったので、調べた結果をまとめておきます。

ついでに、アンインストール方法も。


✅ 前提条件

  • OS: macOS または Linux
  • インストール方法: npm または Homebrew

🔄 バージョンアップ方法

npm 経由(macOS / Linux 共通)

npm install -g @openai/codex@latest
codex --version
  • @latest で最新版を取得
  • codex --version でバージョンを確認

Homebrew 経由

brew update
brew upgrade codex
codex --version
  • brew update で Formula を最新化
  • brew upgrade codex で最新版へ更新

🗑️ アンインストール方法

npm 経由

npm uninstall -g @openai/codex

設定ごと消したい場合は:

rm -rf ~/.codex

Homebrew 経由

brew uninstall codex
brew autoremove  # 不要な依存をクリーンアップ

設定削除も必要であれば:

rm -rf ~/.codex

📌 まとめ

  • なぜアップデートするのか?
    • どんどん新しい機能が追加されるから
    • 不具合修正が反映されるから
  • アップデート方法
    • npm: npm install -g @openai/codex@latest
    • Homebrew: brew update && brew upgrade codex
  • アンインストール方法
    • npm: npm uninstall -g @openai/codex
    • Homebrew: brew uninstall codex(必要なら brew autoremove
  • 設定ファイル削除(任意)
    • rm -rf ~/.codex

🔗 参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?