I would like to have the current system (16.04) manage the upgrade (to 18.04.2) as suggested by the Software Updater. However, I would also like to preserve the content of /home, /opt and /usr/local that, in the current filesystem, are mounted to dedicated partitions.
Keeping /home untouched sounds like a trivial requirement. On the other hand, the other two directories also contain custom installations and links that a user would not want to delete, but I am not so sure whether the Software Updater will format them.
The question here is: will the automatic upgrade procedure only overwrite those filesystem directories strictly needed by the system (/, /boot, /var, /tmp, /etc, etc), and leave the others untouched?
The answer will help me realize the amount of work needed down the line if I take this avenue. I am aware that, alternatively, I could steer the installation manually and preserve those directories.
do-release-upgrade
tool just upgrades packages likedist-upgrade
(a little more than that technically; eg. it sets an order) so it doesn't touch user directories. You should of course backup, and ensure you have space. If you want it to be perfect; you can remove unofficial/3rd party packages as these are what create problems (if they use a non-Ubuntu compatible versioning etc). – guiverc Sep 30 '19 at 10:53