Score:1

Trying to upgrade Ubuntu but cannot complete prerequisite update

pr flag

I am fairly new to Ubuntu

My system has been failing to upgrade to 23.04 since it came out.

Instructions are:

  • Install ALL pending software updates
  • then upgrade

Unfortunately,

sudo apt full-upgrade

ends with the following message:

The following packages have been kept back:

(Package details deliberately omitted.)

0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.

I can see more details as expected with:

apt list --upgradable

In answer to the question whether to force the update: How to force "packages [that] have been kept back" to be installed [as] "automatic"?

The general gist was don't and wait for a fix. So how can I upgrade with out forcing the issue?

sudo do-release-upgrade

Fails as expected with:

Please install all available updates for your release before upgrading.

How can/should I get these packages to update? or do I need to delete them and their dependencies? That could be quite painful.

Or do I just carry on waiting?

Organic Marble avatar
us flag
If you don't provide details (the problematic packages) no one can help you. In general this happens because you have added software sources to your system that cause conflicts in the package system, but if you want detailed help, you must provide detailed info.
PonJar avatar
in flag
Did you check to see if the held back packages are being phased? The link you provided in you question describes how to do this? If they are being phased there is little risk in forcing the upgrade
Score:1
cn flag

First, determine the reason why the packages are kept back.

There are two main possibilities: Phased Updates or Version Conflict

Phased updates are easy to spot and phasing can be easily skipped so you can release-upgrade:

$ sudo apt update 
[...]

$ apt policy foo
[...]
  Version table:
 *** 1.1.1 500 (phasing=50%) <------------- This package is phasing
[...]

// One-time (not permanent) way to immediately install Phased Updates.
$ sudo apt -o APT::Get::Always-Include-Phased-Updates=true upgrade

Version conflicts look more like this: Multiple versions from multiple sources. Each version conflict must be solved or fixed before a release-upgrade is possible. Happily, they are usually not difficult.

$ sudo apt update
[...]

$ apt policy foo
foo:
  Installed: 1.2
  Candidate: 1.2
  Version table:
 *** 1.1 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
     1.2 500
        500 http://someplace-else.org/ stable amd64 Packages   <--- The Problem
        100 /var/lib/dpkg/status

// Revert to the compatible Ubuntu package by specifying the version
$ sudo apt install foo=1.1

// Delete or disable the source that provides the conflicting package(s)
$ sudo apt edit-sources

// Since your sources just changed:
$ sudo apt update

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.