Image builder: how to ged rid of dnsmasq?

Hello all,

with 22.03.5 release image bulder i created an own sysupgrade.bin file for my Ubiquit Unifi AC Pro
and installed it successfully on the device.

Now i'm trying to get rid of dnsmasq with image builder
I added "-dnsmasq" to "PACKAGES" and it no longer shows
"Installing dnsmasq (2.86-16) to root..." in log,
but after installing with sysupgrade dnsmasq is active.

Removing it manually with

service dnsmasq disable
service dnsmasq stop
opkg remove dnsmasq

succeeds, but after reinstalling my sysupgrade.bin file dnsmasq is active again.
I didn't find any dependency to dnsmasq and also got no error message from opkg remove

How can i remove dnsmasq with image builder to save space in image?
Thanks for help, regards

Is it listed in the build manifest list after the build has compleated?

It is probably a dependable specified in the actual device config. And to get rid of that at build time it is possible you need to build from source code. The image builder only packages the image, the actual image has already been built defines by your device and its depenables when the imagebuilder was buildt.


It's a mandatory package indeed for the router device type AFAIK. Even when compiling from source you'd only be able to remove the package by stripping it from the list of mandatory packages, AFAIK.

1 Like

From source there is no problem removing it and a lot of other not needed packages from the make config, I’ve done this operation a lot of times both on the EAP245, EAP225 and Realtek switch.

I really haven't get to this day why OpenWrt want any DHCP server and/or a firewall in access points and switches?

The primary use case for OpenWrt is router firmware. You can configure it to be an access point/switch, but removing the bits needed for basic router functionality from the default builds would hugely impact many users.
The only reason I can see to remove the components is to continue basic support devices with smaller flash, and if that’s what you need then custom image builds are the right choice as they give you full control.

We have pretty much left that behind now since introducing business class AP and switches, RaspberryPi and Virtual machines.
Now it is general networking firmware from top to bottom.

1 Like

Thanks for all replies.

No, it's not

To my intention to remove dnsmasq:
I want to use the AP behind a second full featured router (with DNS, DHCP, Firewall, ...)
So the AP needs only minimal SW and i want to add some monitoring features, which need space in flash mem.

I will try to setup a complete build environment and remove dnsmasq here and see how it works.


Might be that I patched out dnsmasq for the 'switch' device type. Been a while and that patch just sits in my pile of patches :slight_smile:.

I do not think OpenWrt has an 'acces point' device type, so there's no way to differentiate between a router and access point on that level. Plus, lots of people decide to use APs as routers, and technically they often share the same SoCs, unlike switches.

If it’s not in manifest it ain’t installed with the image.

If you run a opkg list dnsmasq does it say installed? (Remember to update the list first)

What exactly does the “dnsmasq active” you mention at the beginning look like?

i did a "reset to defaults" and installed the sysupgrade.bin and my backup config again.
After this dnsmasq is gone :slight_smile: but i don't know exactly why.

When i remember right, i did once opkg remove dnsmasq followed opkg install dnsmasq.
Could this lead to remain dsnmasq in overlay fs?

My problem is solved, sorry for bothering.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.