First of all, sorry for the long question.

I have tried the following set of commands to upgrade my 16.04 to 18.04. The end result is "Please install all available updates for your release before upgrading."

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
$ sudo apt autoremove
$ sudo apt install update-manager-core
$ sudo do-release-upgrade

I am using this article as the reference.

Currently, I am using 16.04. Notification is set to For long-term support version. in Software & Update > Update section

I ran $ sudo apt list --upgradable -a after getting the message Please install all available updates for your release before upgrading. The output of the above command is:

ruby-dev/xenial 1:2.3.0+1 all [upgradable from: 1:] ruby-dev/now 1: all [installed,upgradable to: 1:2.3.0+1]

So, I ran $ sudo apt-get install ruby2.3 ruby2.3-dev, but the output says

Here is the output:

ruby2.3 is already the newest version (2.3.8-4bbox1~trusty1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ruby2.3-dev : Depends: libruby2.3 (= 2.3.1-2~ubuntu16.04.14) but 2.3.8-4bbox1~trusty1 is to be installed
E: Unable to correct problems, you have held broken packages.

Here are wo putputs:

  • ruby2.3 is already the newest version (2.3.8-4bbox1~trusty1)
  • ruby2.3-dev : Depends: libruby2.3 (= 2.3.1-2~ubuntu16.04.14) but 2.3.8-4bbox1~trusty1 is to be installed

The interesting part is that the first output shows the version already installed and in the second output line is asking for the same exact version!

I even tried $ sudo apt-get install libruby2.3 and got this:

libruby2.3 is already the newest version (2.3.8-4bbox1~trusty1).
libruby2.3 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

What is the correct workaround for this? According to this article, it looks like many users have come across through this particular issue.


Please see the output of $ sudo apt policy libruby2.3 below.

  Installed: 2.3.8-4bbox1~trusty1
  Candidate: 2.3.8-4bbox1~trusty1
  Version table:
 *** 2.3.8-4bbox1~trusty1 100
        100 /var/lib/dpkg/status
     2.3.1-2~ubuntu16.04.14 500
        500 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     2.3.0-5ubuntu1 500
        500 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
  • Why does the ruby package refer to 'trusty'? That makes me think you have something hanging over from 14.04 It looks like the latest xenial package is 2.3.1-2~ubuntu16.04.14. I suspect you have something bad in your sources list. A ppa from 14.04 or some such. please edit your question and include the output of apt policy libruby2.3 Commented Sep 2, 2020 at 14:50
  • @OrganicMarble, thank you for your quick reply. I have included the command output in the original post. Commented Sep 2, 2020 at 15:47
  • So, where did that version of the package come from? It's not in the official repos. Did you download it from somewhere and install it? Commented Sep 2, 2020 at 15:54
  • As far as I remember, no! I always use ubuntu commands to install anything. But to be honest, I don't remember. If what you are saying is correct, please suggest me the workaround. I cannot update my PHP version as well. Commented Sep 2, 2020 at 16:09
  • I'm not a ruby user so I am afraid to give advice. If I were in a similar situation I'd purge the software and reinstall from the repos. But I do not know what impact that would have on your work. Commented Sep 2, 2020 at 16:27

1 Answer 1


Remove the package and try again.

sudo apt remove --purge ruby2.3 ruby2.3-dev
sudo apt autoremove

Then download This file and install it using the software installer.

Then do the upgrade.

Not the answer you're looking for? Browse other questions tagged .