Do-release-upgrade from 22.04 to 24.04 deleted systemd-resolved


I got a warning during the upgrade from 22.04 to 24.04 that deleting systemd-resolved would create name resolution problems (no kidding).

Having completed the upgrade to 24.04, I now have no ability to resolve queries. The obvious solution would be to reinstall systemd-resolved; but apt fails because it cannot resolve ''. (chicken–>egg–>chicken) I managed to workaround that by adding a temporary entry in /etc/hosts:

But now apt is failing because it can't resolve 'proxy'. Temporary failure resolving 'proxy' I have no proxy configured and there is no host by that name.

What do I need to do to just get systemd-resolved installed?

Or is there new resolver for 24.04 that I need to enable?

Why did do-release-upgrade uninstall it and not replace it?

Best Answer

I have a successful workaround. Download .deb from and install directly. Now I have working name resolution again.

One method to download with dysfunctional name resolution and curl would be to use something like this:

curl -L --doh-url -O $URL

where -L makes curl follow location headers (redirects) and --do-url tells it to do name resolution via the Quad9 DNS. A possible alternative would be --resolve 'somename.tld:80:[::1]' (IPv6) or --resolve 'somename.tld:80:' (IPv4) to sidestep system name resolution for a single request.

Related Question