The average, reasonably-complex (and vanilla) Emacs config will consume ~100mb of space.
The average, similarly complex Doom config can consume between 3 and 15 times that (between 250mb and 1.5gb), depending on what packages you have installed, and how long you go without running
Why? And can I reduce its usage?
A couple reasons:
Doom’s package manager (straight.el) clones packages from their source. This sometimes includes unrelated files, connected codebases (submodules), and/or binary assets.
Some Emacs packages are served as part of a much larger git repository (i.e. you’ll download a 5mb repo for 10kb worth of text files).
When you’ve disabled modules or packages, those packages (and their build artifacts) aren’t removed from your harddrive until you do a purge.
When you’ve changed your installed version of Emacs, Doom creates a new build directory, leaving the old one lying around until you do a purge.
Servers and programs installed by Emacs packages (like LSP servers,
vterm-module.so) are stored under
~/.emacs.d/.local. These can easily consume a lot of space.
native-comp users only) ELN files can add up to hundreds of mb, and they aren’t deleted until you do a purge.
How do I perform a purge?
doom sync -p to do it as part of a
doom sync, or
doom purge -g.
- Convert all package repos to shallow clones and prune/gc them.
- Delete orphaned package builds and repos (e.g. from previous Emacs versions or disabled modules).
- Delete any temporary packages installed with
- (For native-comp users) Delete left-over *.eln from previous version of native-comp or unused packages.
This can shave approximately 10-30% of the used space, but that is as good as it gets. The upper limit of a Doom config (with all its modules enabled) is around 1.5gb. Unless space is very limited, it isn’t something to worry about, and that extra data is necessary for Doom’s backup and rollback functionality.