35

I've tried to sudo update and upgrade as usual but it displays

The following packages have been kept back:
  base-files python3-distupgrade python3-gi python3-gi-cairo
  ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

I've tried:

  • the normal procedure (sudo apt update and upgrade)
  • the apt-get procedure
  • sudo -i and performed the normal procedure -https://www.youtube.com/watch?v=Il_Za-wlW5I (whats in this video)
  • changing software updater and software and updates settings

(also tried restarting my laptop)

Before I tried mounting an usb and a sd card. While I tried this I didn't have a net connection at the time. I tried updating and of course it didn't work. After noticing and reconnecting I did install some updates but then it got stuck on that display

Full display: sudo apt update

[sudo] password for dcg: 
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:7
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:7
dcg@dcg-IdeaPad-5-15ITL05:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  base-files python3-distupgrade python3-gi python3-gi-cairo
  ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

List of updates:

cg@dcg-IdeaPad-5-15ITL05:~$ apt list --upgradable
Listing... Done
base-files/jammy-updates 12ubuntu4.2 amd64 [upgradable from: 12ubuntu4.1]
python3-distupgrade/jammy-updates,jammy-updates 1:22.04.12 all [upgradable from: 1:22.04.11]
python3-gi-cairo/jammy-updates 3.42.1-0ubuntu1 amd64 [upgradable from: 3.42.0-3build1]
python3-gi/jammy-updates 3.42.1-0ubuntu1 amd64 [upgradable from: 3.42.0-3build1]
ubuntu-release-upgrader-core/jammy-updates,jammy-updates 1:22.04.12 all [upgradable from: 1:22.04.11]
ubuntu-release-upgrader-gtk/jammy-updates,jammy-updates 1:22.04.12 all [upgradable from: 1:22.04.11]

dcg@dcg-IdeaPad-5-15ITL05:~$ sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99,8 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [260 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [474 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [196 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [102 kB]
Fetched 1356 kB in 4s (386 kB/s)                        
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:7
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:7
dcg@dcg-IdeaPad-5-15ITL05:~$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  base-files python3-distupgrade ubuntu-release-upgrader-core
  ubuntu-release-upgrader-gtk
The following packages will be upgraded:
  python3-gi python3-gi-cairo
2 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 237 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-gi-cairo amd64 3.42.1-0ubuntu1 [8184 B]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-gi amd64 3.42.1-0ubuntu1 [229 kB]
Fetched 237 kB in 1s (410 kB/s)    
(Reading database ... 215354 files and directories currently installed.)
Preparing to unpack .../python3-gi-cairo_3.42.1-0ubuntu1_amd64.deb ...
Unpacking python3-gi-cairo (3.42.1-0ubuntu1) over (3.42.0-3build1) ...
Preparing to unpack .../python3-gi_3.42.1-0ubuntu1_amd64.deb ...
Unpacking python3-gi (3.42.1-0ubuntu1) over (3.42.0-3build1) ...
Setting up python3-gi (3.42.1-0ubuntu1) ...
Setting up python3-gi-cairo (3.42.1-0ubuntu1) ...

(From here on out only 4 packages were not upgraded...I don't know how the other 2 upgraded)

Using sudo apt full-update:

dcg@dcg-IdeaPad-5-15ITL05:~$ sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99,8 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [260 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [474 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [196 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [102 kB]
Fetched 1356 kB in 4s (386 kB/s)                        
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:7
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:7
dcg@dcg-IdeaPad-5-15ITL05:~$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  base-files python3-distupgrade ubuntu-release-upgrader-core
  ubuntu-release-upgrader-gtk
The following packages will be upgraded:
  python3-gi python3-gi-cairo
2 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 237 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-gi-cairo amd64 3.42.1-0ubuntu1 [8184 B]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-gi amd64 3.42.1-0ubuntu1 [229 kB]
Fetched 237 kB in 1s (410 kB/s)    
(Reading database ... 215354 files and directories currently installed.)
Preparing to unpack .../python3-gi-cairo_3.42.1-0ubuntu1_amd64.deb ...
Unpacking python3-gi-cairo (3.42.1-0ubuntu1) over (3.42.0-3build1) ...
Preparing to unpack .../python3-gi_3.42.1-0ubuntu1_amd64.deb ...
Unpacking python3-gi (3.42.1-0ubuntu1) over (3.42.0-3build1) ...
Setting up python3-gi (3.42.1-0ubuntu1) ...
Setting up python3-gi-cairo (3.42.1-0ubuntu1) ...
12
  • 1
    You've not provided any OS/release details (useful in understanding package issues), nor provided full text messages of your issue, thus we're rather limited in how we can help you. Assuming you've made no changes to default python3 packages, you should read all your messages for clues; starting with sudo apt update (ie. inappropriate sources for your unstated release) then the commands you mention. FYI: You do realize there are package upgrades that apt upgrade cannot perform; ie. why apt full-upgrade (or dist-upgrade) exist as per documentation.
    – guiverc
    Commented Jul 31, 2022 at 1:03
  • dcg@dcg-IdeaPad-5-15ITL05:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy (i'll send the full text issue next) Commented Jul 31, 2022 at 1:06
  • full display on the question now (edited) Commented Jul 31, 2022 at 1:10
  • Did you try sudo apt full-upgrade ; read man apt to see the difference in the commands, ie. it'll report "full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole" ie. apt upgrade can leave some behind if removes are required. You can also list the packages so you can explore one to find out why specifically it's not being upgraded.
    – guiverc
    Commented Jul 31, 2022 at 1:13
  • 3
    Does this answer your question? How to force "packages [that] have been kept back" to be installed [as] "automatic"
    – FedKad
    Commented Jul 31, 2022 at 5:31

3 Answers 3

58

All four of the kept-back packages (base-files, python3-distupgrade, ubuntu-release-upgrader-core, ubuntu-release-upgrader-gtk) were in Phased Updates at the time you asked the question.

  • Phased Updates is one precaution to prevent everybody from receiving a buggy package via upgrade: Some people get the upgraded a few days earlier, others a few days later. This provides an opportunity to pause distribution if early folks report problems.

There is nothing wrong. Your system is NOT broken.

Do not try to force the upgrades. Apt will properly install each upgraded package automatically when your turn comes. Phasing typically runs a week or so. Simply run apt update and apt upgrade again in a few days.

  • Security upgrades are usually NOT phased. Everybody gets those immediately. The four packages in your question are phased, and therefore NOT security upgrades.

How to see Phased Updates:

$ apt policy base-files 
base-files:
  Installed: 12ubuntu4.1
  Candidate: 12ubuntu4.2
  Version table:
     12ubuntu4.2 500 (phased 60%) <------------ There it is!
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
 *** 12ubuntu4.1 100
        100 /var/lib/dpkg/status
     12ubuntu4 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

You can also see phased update status for some (not all) packages at https://people.canonical.com/%7Eubuntu-archive/phased-updates.html


How to skip phasing, jump to the head of the queue, and install the new package anyway:

Tell apt what you want using the -o (option) flag.

apt -o APT::Get::Always-Include-Phased-Updates=true upgrade
  • Jumping to the head of the queue is not recommended for most users. You're volunteering to be the tester; for any bugs to affect you first. Bugs in updates are rare, but they do occur.
10
  • 3
    This is accurate. You might want to add that users can run apt -o APT::Get::Always-Include-Phased-Updates=true upgrade if they wish to receive updates earlier than the usual phasing. This is mostly safe - it just puts them at the front of the "queue" by bypassing the phasing. Though of course if the package turns out to have been a problem that they would have saved from by the phasing, then that won't happen. Commented Aug 5, 2022 at 6:55
  • Thanks, @user535733, for the hint. I will try to issue a bug/spec on launchpad.
    – mfg
    Commented Aug 22, 2022 at 13:29
  • 2
    Thanks for providing some more details on this. I didn't even know this was even a thing in Ubuntu, as packages being held back in the past usually happened for other reasons. The last few weeks I've had this happen a lot, to the point where I thought it was a bug or some dependency problem. The fact that the message shown often used to mean something else in the past causes some unnecessary confusion. Preferably, the message shown would tell you the reason they were held back. :)
    – blunden
    Commented Aug 25, 2022 at 9:20
  • Given the amount of times this question has been asked and the different solutions (upgrade vs manual install vs phased updates) I wonder if it would be an improvement if the reason of why a package is held back would be displayed.
    – Anemoia
    Commented Oct 20, 2022 at 20:48
  • @Anemoia most discussion of Phased Updates occurring at discourse.ubuntu.com/t/phased-updates-in-apt-in-21-04/20345. Note that "reason why a package has been held back" has been mentioned."
    – user535733
    Commented Oct 20, 2022 at 22:15
3

If you want to permanently opt-in to all phased upgrades in the future, you can create a conf file so that you don't have to add a long command-option each time you issue apt upgrade.

/etc/apt/apt.conf.d/30phased-upgrades

APT::Get::Always-Include-Phased-Updates "true";
-1

I had a similar problem and I solved it installing the aptitude package and running the following command.

$ sudo aptitude update
$ sudo aptitude upgrade

Seeing some of the answers I don't know now if did wrong and got that buggy package, but my computer works perfect at the moment, and I never had the same issue again.

5
  • 2
    This particular "issue" was actually the system working properly. While you can indeed haywire your system to force/bypass/disable Phased Updates, it's a bad idea for most users.
    – user535733
    Commented Aug 17, 2022 at 2:21
  • 1
    Does that means that I should not use the aptitude package for updating and upgrading? What problems could I have due to this? As fur as I know is more advanced than apt and dpkg, and that's the only thing I did, I didn't touch any internal thing from the system.
    – Dcodewin
    Commented Aug 18, 2022 at 10:18
  • 1
    Aptitude is not "more advanced"; it's just "different". Some people like it, some people don't. Aptitude is the recommended package manager for Debian, while apt is the recommended package manager for Ubuntu. Neither is better or worse than the other. Use the one that you understand best, and that does not break your system.
    – user535733
    Commented Aug 18, 2022 at 16:41
  • Thank you very much for all the info. I didn't know that. So in this case, is using aptitude on Ubuntu considered haywire the system? Which might be the consequences for most users if something goes wrong?
    – Dcodewin
    Commented Aug 23, 2022 at 23:36
  • Your answer strikes me as equally valid compared to the others here. The other answer ultimately falls back on speculation to explain what seems an amazingly ill-considered "feature". This "kept back" business seems unnecessary, and a "bad Ubuntu idea"; at least your answer spares us the hand-waving & hyperbole.
    – Seamus
    Commented Sep 16, 2022 at 19:24

You must log in to answer this question.

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