I got the error related to the
Invalid package information. the essential package 'ubuntu-minimal' could not be located while upgrading Ubuntu 16.04 to the next version.
This blog post describes how to fix such an error on the Digital Ocean droplet.
The error output looks like this:
To resolve that issue, we need to allow using 3rd party repositories during the release upgrade.
Run the command in Terminal: