Using an AI coding agent to clean up old Emacs packages

An can help clean up Emacs packages that have built up over many years. The useful part is not that the AI already understands Emacs perfectly, but that it can inspect both the setup files and the live Emacs state. It can scan the for `require`, `use-package`, and `load-path`, which show how packages are loaded or connected.

It can also check which packages are actually active while Emacs is running. By comparing installed packages with packages that are still referenced or active, it becomes easier to separate unused packages from ones that are still needed. This turns package cleanup from guesswork into a ranked list of likely removals.

The setup used `ai-code-interface.el` with Codex CLI and Emacs MCP tools, and a similar workflow may be possible with `-ide.el`.

Key points

  • An can gather evidence for cleaning up old Emacs packages.
  • It checks references such as `require`, `use-package`, and `load-path`.
  • It also checks the live Emacs state to see what is actually active.
  • The result is a ranked cleanup list instead of pure guessing.
  • The workflow used `ai-code-interface.el`, Codex CLI, and Emacs MCP tools.
Read original