Keeping your Emacs packages up to date is essential if you want the latest features, performance improvements, and security fixes. But manual updates can quickly become a chore — especially if you use Emacs as your main development environment and rely on dozens of packages.
Fortunately, the Emacs community has a great solution: the auto-package-update package by rranelli. It automates the entire update process so your Emacs setup stays clean, stable, and current without you lifting a finger.
In this article, you’ll learn what the package does, why it's useful, and how to configure it for your own workflow.
What Is auto-package-update?
auto-package-update is a small Emacs package that automatically updates installed packages from MELPA, GNU ELPA, or any other configured package archives. It can:
- Check for updates periodically
- Update all installed packages
- Clean up old package versions
- Run silently in the background
- Notify you about updates when they occur
It’s one of the easiest ways to ensure your Emacs stays healthy and efficient — especially for users who don't want to micromanage package maintenance.
Why Use It?
✔ Save time
No more manually checking M-x list-packages and hunting for outdated versions.
✔ Prevent version drift
Daily or weekly updates keep your environment consistent across machines.
✔ Cleaner Emacs directory
It automatically deletes old package versions so your filesystem doesn’t grow endlessly.
✔ Set-and-forget workflow
Once configured, updates just happen on their own.
Installation
If you're using use-package, installation is easy:
(use-package auto-package-update
:ensure t)
If you prefer manual installation, simply run:
M-x package-install RET auto-package-update RET
Basic Configuration
Here is a clean, minimal configuration that works great for most users:
(use-package auto-package-update
:ensure t
:custom
(auto-package-update-interval 7) ;; Check for updates every 7 days
(auto-package-update-prompt-before-update t)
(auto-package-update-hide-results t)
(auto-package-update-delete-old-versions t)
:config
(auto-package-update-maybe))
What these options mean:
- auto-package-update-interval — How often to check for updates (in days).
- auto-package-update-prompt-before-update — Ask before updating.
- auto-package-update-hide-results — Prevent update buffers from cluttering your workspace.
- auto-package-update-delete-old-versions — Automatically remove outdated versions of packages.
- auto-package-update-maybe — Runs the update check automatically when Emacs starts.
Silent, Fully Automatic Updates
If you want zero interruptions, use this:
(use-package auto-package-update
:ensure t
:custom
(auto-package-update-interval 3)
(auto-package-update-prompt-before-update nil)
(auto-package-update-hide-results t)
(auto-package-update-delete-old-versions t)
:config
(auto-package-update-maybe))
Manual Trigger
Even with auto-updates enabled, you can trigger a manual update at any time:
M-x auto-package-update-now
Tips for Stability
Updating regularly is great — but Emacs users know that an occasional package update may introduce a breaking change. To minimize risk:
1. Use straight.el for rollback capability (optional)
Straight can pin or lock versions if needed.
2. Set the interval to something safe (e.g. 7 days)
Daily updates are rarely necessary unless you're tracking bleeding edge packages.
3. Backup your config or use git
Version-controlling your .emacs.d is always a good idea.
Conclusion
auto-package-update is one of those tiny Emacs packages that brings huge quality-of-life improvements. Whether you're a casual Emacs user or running a finely tuned development environment, this tool lets you enjoy the latest Emacs ecosystem without the hassle of constant manual updates.
If you want a clean, stable, and always-up-to-date Emacs setup — this is the package to install.