How do I upgrade to a newer version of Ubuntu? does a great job of explaining how to do a version upgrade. It also says "Upgrading Ubuntu works 99 times out of 100" which has not been my experience – I've had issues about 6 out of 6 times (I don't blame Ubuntu – I think my messing with my installation without a deep understanding of what I'm doing creates atypical problems). So I always image my entire system before I attempt an upgrade. Then I attempt the upgrade, and if it doesn't go well and my attempts to resolve the issues fail, I restore the system back to where I started. All of which takes a fairly long time.
So I'm wondering if there is a way to simulate a version upgrade so I can find out if there are going to be trouble areas and potentially address them prior to the actual upgrade.
For example, on my current 14.04.3 installation, apt-get check
and apt-get -f install
report no issues. But after I performed an upgrade to 14.10 last night, 3 or 4 packages were broken and I couldn't resolve the conflicts. Is there a way, before attempting an upgrade, to see what's wrong with an installation that might cause a problem when upgrading?
I imagine this could be useful information even if one doesn't upgrade – these "hidden" issues might be causing stability or performance issues…
Best Answer
do-release-upgrade
will carry out a release upgrade butdo-release-upgrade
doesn't have a dry run option. But, it does have a--sandbox
option.From the point of running in
--sandbox
mode, any changes made to your system will actually be written to a ramdisk, and reset upon reboot via the magic os Aufs. This lets you test your machine thoroughly in a fully functioning state, without risking breaking it.From the original mailing list;
For more information on this refer to the original mailing list or this post.
For dist-upgrades, you can use the
--dry-run
withsudo apt-get dist-upgrade
to simulate running this command without actually performing the upgrade.