I have a daemon running in a chroot jail that I have generated with debootstrap.
I'd like to remove apt and dpkg from the jail, but I want to keep the other packages updated.
Can I upgrade the packages in the jail, running apt-get from outside?
I'm not sure why you want to do this. dpkg and apt are fundamental parts of a Debian system, and your chroot won't function independently without them. Running
chroot /path/to/chroot apt-get update
and so on is a supported method that doesn't require removing dpkg and apt.
But if you're sure you want to do it, you can run
APT_CONFIG=/path/to/apt.conf apt-get update
where /path/to/apt.conf is the path of an apt.conf file that includes
The rest of the apt configuration will then be read from /path/to/chroot/etc/apt/apt.conf.d, or somewhere else under /path/to/chroot if you change
Dir::Etc in the apt.conf file. See the Description and Directories sections of
man apt.conf for details.