Recently, I noticed a warning from Magit (code reference in magit repo) saying that it requires newer version of `transient`, but Emacs can't automatically upgrade it, since the build-in packages are not upgrade-able by default. It is done for safety reasons, since not all packages might be ready to upgrade their dependencies.
Remark, Emacs has build-in packages distributed within Emacs. Frequently, those package have the other version which can be installed using various packages sources. In the most of the cases, those are the same packages, but coming from different update channels (Emacs distribution vs. package repository). Once some packages became widely and frequently used, they might be integrated into Emacs distribution by Emacs maintainers. Some of the examples are Eglot, Tree-Sitter, use-package.
Fortunately, as Magit message suggests, there is a way to solve it. Emacs has a flag which overrides the behavior and allow to install/upgrade a package from using external sources (package repository):
(setq package-install-upgrade-built-in 't)
But, unfortunately, not all commands respect the flag. Documentation of package-upgrade-all
command says:
Currently, packages which are part of the Emacs distribution are not upgraded by this command. To enable upgrading such a package using this command, first upgrade the package to a newer version from ELPA by using ‘i’ after ‘M-x list-packages’.
But, there is a solution: One can navigate to the list of package using package-list-packages
command, press U
, and then x
in order to upgrade all the package and transit them from "build-in" to "external" state. From that point, all of the packages can be updated using package-upgrade-all
.