I suspect a plain chroot isnt 'enough', i had success with systemd-nspawn: ln -s /tmp/bullseye/ /var/lib/machines
# im sure there is a better way than these two lines cp /etc/passwd bullseye/etc/passwd cp /etc/shadow bullseye/etc/shadow systemd-nspawn --ephemeral --boot --machine bullseye # (you dont really need --ephemeral of course) log into the container as root: # apt install emacs-gtk (and say yes to allow the installation to finish) # ls /usr/share/emacs/site-lisp/elpa dash-2.17.0 dash-functional-1.2.0 elisp-refs-1.4 helpful-0.18 loop-1.3 dash-2.19.1 elisp-refs-1.3 f-0.20.0 helpful-0.19 s-1.12.0 Shows the 'duplicate' dirs for the old versions of elpa-dash and elpa-helpful Additionally: # echo "(require 'helpful nil t)" > ~/.emacs # emacs --no-init-file --batch --eval "(byte-compile-file \".emacs\")" # reproduces the warnings: Loading /etc/emacs/site-start.d/00debian.el (source)... Warning (comp): Cannot look-up eln file as no source file was found for /usr/share/emacs/site-lisp/elpa/helpful-0.18/helpful.elc Warning (comp): Cannot look-up eln file as no source file was found for /usr/share/emacs/site-lisp/elpa/elisp-refs-1.3/elisp-refs.elc Warning (comp): Cannot look-up eln file as no source file was found for /usr/share/emacs/site-lisp/elpa/dash-2.17.0/dash.elc Warning (comp): Cannot look-up eln file as no source file was found for /usr/share/emacs/site-lisp/elpa/loop-1.3/loop.elc Warning (comp): Cannot look-up eln file as no source file was found for /usr/share/emacs/site-lisp/elpa/dash-functional-1.2.0/dash-functional.elc ## to cleanup: # close the container by pressing C-] several times # rm /var/lib/machines/bullseye and /tmp/bullseye