Why does an Ubuntu upgrade to earlier release unlike Debian doesn't require to edit sources.list file?
I'm just asking about upgrading using package manager.
Why does an Ubuntu upgrade to earlier release unlike Debian doesn't require to edit sources.list file?
I'm just asking about upgrading using package manager.
Ubuntu is upgraded differently from Debian. In Debian the process includes manually editing /etc/apt/sources.list
, while in Ubuntu it does not becuase you use automated tools instead that perform that step and the other necessary steps. Editing /etc/apt/sources.list
and upgrading with APT is neither necessary nor sufficient to correctly upgrade an Ubuntu system to a newer release.
See below for more details about this. However, if your goal is just to upgrade your Ubuntu system, I recommend How do I upgrade to a newer version of Ubuntu? as well as this tutorial (for a desktop system) and these instructions (for a server system, though the do-release-upgrade
way works for desktop systems too).
/etc/sources.list
?It is necessary, but in Ubuntu you don't do it yourself.
Unlike in Debian, the recommended ways to upgrade to a newer release of Ubuntu (such as from 12.04 LTS to 14.04 LTS) do not involve manually editing /etc/sources.list
. Instead you use the Update Manager / Software Updater or run the do-release-upgrade
command.
Editing /etc/apt/sources.list
to replace each official Ubuntu repository with the corresponding repository for the target Ubuntu release is one of the steps performed automatically as part of the upgrade. However, there are other important steps as well.
If you attempt to upgrade Ubuntu to a later release as though it were Debian, by manually editing /etc/apt/sources.list
and then issuing upgrade commands with apt
/apt-get
/aptitude
, it is likely--though not certain--that you will get a broken system and have to reinstall. If you want the upgrade to work and the resulting Ubuntu system to be usable, then you should not attempt to upgrade it that way.
/etc/sources.list
?It isn't always sufficient in Debian, either.
Ubuntu has tools that perform the other actions necessary for upgrading. The correct way to upgrade a Debian system is to read and follow the upgrade instructions in the target system's release notes. Usually the process is simple and pretty easy, but the specific steps do differ between releases.
Reading release notes for Ubuntu it useful, too, but Ubuntu has tools that perform all the necessary actions behind the scenes. If you were to perform exactly the same actions yourself, correctly and in the correct order, then you would succeed at upgrading the system. (If you did that, then editing /etc/sources.list
would be one of the steps.) This is neither required nor recommended. The tools do it for you.
There are also some differences between Ubuntu and Debian that create the need for some Ubuntu-specific steps. For example, when you upgrade an Ubuntu system, PPAs are automatically disabled. The specific details of what happens in an upgrade change somewhat between Ubuntu releases but What does `do-release-upgrade` really do? should give you an idea.
/etc/apt/sources.list
, while in Ubuntu, it does not. I think we have a question that addresses this, and that this could be duplicated to, but I'm not sure. I seem to recall a question about whatdo-release-upgrade
actually does in Ubuntu that is different from the upgrade steps Debian users use. Maybe What doesdo-release-upgrade
really do?, though I thought there was something else more specific to this. – Eliah Kagan Aug 04 '17 at 12:13/etc/sources.list
isn't recommended for Ubuntu, but I can't tell if you're just curious about this or if you're actually having a problem performing an upgrade and want help. – Eliah Kagan Aug 04 '17 at 12:20