Hello All, I upgraded a droplet recently to Ubuntu 24.04 yet apache is still depending on 22.04 packages and I am getting the following message: The following packages have unmet dependencies: apache2 : Depends: apache2-bin (= 2.4.58-1ubuntu8.1) but 2.4.58-1+ubuntu22.04.1+deb.sury.org+1 is to be installed Depends: apache2-data (= 2.4.58-1ubuntu8.1) but 2.4.58-1+ubuntu22.04.1+deb.sury.org+1 is to be installed Depends: apache2-utils (= 2.4.58-1ubuntu8.1) but 2.4.58-1+ubuntu22.04.1+deb.sury.org+1 is to be installed E: Unable to correct problems, you have held broken packages.
Would you please let me know how to solve this issue?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya,
You can get a list of actual held packages with:
Try updating specifically those held packages and see if that would help.
If none of these help, you can try to re-install Apache but you’ll need to configure your configuration files again.
No matter what you try to do, create a snapshot prior to that so that you can revert back if something that you cannot fix breaks:
https://docs.digitalocean.com/products/snapshots/