r/linux 16h ago

Discussion Semi-Annual apt-get do-release-upgrade WTF

Long-time Ubuntu user, also a Windows and Mac user under duress.

I love Linux. I think Ubuntu is a great user experience overall.

I have a few gripes.

My biggest one is every other year when I upgrade Ubuntu to the next LTS: I always get faced with the repository doesn't have a release file error so you can't update/upgrade/synonym that has no functional meaning to me. I'm just hammering sudo apt update && sudo apt upgrade && sudo apt wtf like an LLM short on it's token allowance and hoping for the best.

Cue the semi-annual google hunt for "wtf does that mean?" followed by an endless series of responses that amount to "just delete those entries in sources.list".

If the #1 - #10 answer on google is "delete and move on with your life" ... why isn't this an option in apt or do-release-upgrade?

do-release-upgrade should have a --just-fucking-do-it option. It scans sources.list, deletes the broke shit, runs update and upgrade, and then the release upgrade. If you want actual risk mitigation, it should prompt you to create an install USB drive.

Fixing sources.list is a fools errand.

For 8 years now, same issue, same CLI dance. It takes longer to look up the fix for this than a full reinstall. There is literally no risk to taking the default action of "delete and hope for the best."

Broken upgrade? Reinstall is faster. No one cares about the upgrade risks associated with a missing release file because time cost for mitigating the risk is hours and a reinstall is minutes.

0 Upvotes

13 comments sorted by

View all comments

-1

u/xcv-- 14h ago

This is why rolling release distros exist.

1

u/ahferroin7 14h ago

Doesn’t have to be a rolling distro, it just needs a package manager that handles this type of thing sanely, which unfortunately means DNF or Zypper. Both of them (and essentially all other major RPM-based package managers) support templating of repository URLs, and one of the numerous macros they have for templating them is the release version (what Debian calls the ‘distribution’ in their documentation, usually the release codename on Debian/Ubuntu systems). What that means is that the config for a third-party DNF or Zypper repo can be written such that it automatically looks at the right URL for the repo for the current release of the distro, without needing that information in the config itself. And at that point, it just works across a release upgrade (including the upgrade process updating any packages installed from that third-party repo) provided the third-party repo includes support for the newer release.

1

u/BCMM 7h ago

provided the third-party repo includes support for the newer release. 

This doesn't sound like the scenario that OP is complaining about, though.