the release images of LEDE contain all the required packages for the web interface LuCI (uhttpd, luci-*). How can I exclude these packages from images when using the LEDE Image Generator (say for version 17.01.4) to generate them?
The Wiki mentions how to add LuCI with this package list: uhttpd uhttpd-mod-ubus libiwinfo-lua luci-base luci-app-firewall luci-mod-admin-full luci-theme-bootstrap
But if I remove all these package, are there any unused dependencies left?
Maybe I wasn't clear enough. I know how to use the Image Generator and how to include or exclude packages. My question is which packages do I have to exclude in order to remove luci, uhttp from the image (and all their dependencies that become obsolete when LuCI isn't needed).
No. LuCI is entirely opt-in. If you do not specify any LuCI components in the PACKAGES=... variable then no parts of LuCI itself or any of its dependencies are selected.
Oh, right. I assumed the image generator would have the same package selection as the released images. But I just tried again, and you are right, luci-* and uhttpd are not included. Great.