An update failed, now i have missing packages.

Asked by JosephB

I was updating my system when the update-manager failed to download updates. The index was broken, but it was easily repaired. I downloaded no packages, however my system is reporting falsely that all 61 updates have been installed. They have not. How can I get my package database to agree with the actual list of installed packages on my computer? Is there a way to rebuild this database?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Please follow the instructions as given in https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

(With the one exception, that you should not open a new question but paste the output into a new message of this questions thread.)

Revision history for this message
JosephB (joseph-bouchard) said :
#2

While this installed one (gwibber) package from last night that hung on download, and it installed all the updates from this morning. It failed to install all the other 60 some missing updates from last night. My system reports that all the updates are installed, yet I know that they are not because none of them ever downloaded. Here is the log:

ck@Inspiron:~$ sudo fuser -vvv /var/lib/dpkg/lock
[sudo] password for ck:
ck@Inspiron:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu Natty (development branch)"
ck@Inspiron:~$ uname -a
Linux Inspiron 2.6.38-8-generic #41-Ubuntu SMP Tue Apr 5 19:29:52 UTC 2011 i686 i686 i386 GNU/Linux
ck@Inspiron:~$ sudo rm /var/lib/apt/lists/lock
ck@Inspiron:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
ck@Inspiron:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
ck@Inspiron:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
ck@Inspiron:~$ sudo rm -rf /var/lib/dpkg/updates/*
ck@Inspiron:~$ sudo rm -rf /var/lib/apt/lists
ck@Inspiron:~$ sudo rm /var/cache/apt/*.bin
ck@Inspiron:~$ sudo mkdir /var/lib/apt/lists
ck@Inspiron:~$ sudo mkdir /var/lib/apt/lists/partial
ck@Inspiron:~$ LANG=C;sudo apt-get clean
ck@Inspiron:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
ck@Inspiron:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up gwibber-service-facebook (3.0.0-0ubuntu2) ...
Processing triggers for python-central ...
ck@Inspiron:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
Ign http://archive.ubuntu.com natty InRelease
Ign http://archive.ubuntu.com natty-updates InRelease
Ign http://archive.ubuntu.com natty-security InRelease
Ign http://archive.canonical.com natty InRelease
Get:1 http://archive.ubuntu.com natty Release.gpg [198 B]
Get:2 http://archive.canonical.com natty Release.gpg [198 B]
Get:3 http://archive.ubuntu.com natty-updates Release.gpg [198 B]
Get:4 http://archive.canonical.com natty Release [5916 B]
Get:5 http://archive.ubuntu.com natty-security Release.gpg [198 B]
Get:6 http://archive.ubuntu.com natty Release [39.8 kB]
Get:7 http://archive.canonical.com natty/partner i386 Packages [780 B]
Ign http://archive.canonical.com natty/partner TranslationIndex
Get:8 http://archive.ubuntu.com natty-updates Release [23.2 kB]
Get:9 http://archive.ubuntu.com natty-security Release [23.2 kB]
Get:10 http://archive.ubuntu.com natty/main Sources [866 kB]
Ign http://archive.canonical.com natty/partner Translation-en
Get:11 http://archive.ubuntu.com natty/restricted Sources [4117 B]
Get:12 http://archive.ubuntu.com natty/universe Sources [4388 kB]
Get:13 http://archive.ubuntu.com natty/multiverse Sources [154 kB]
Get:14 http://archive.ubuntu.com natty/main i386 Packages [1559 kB]
Get:15 http://archive.ubuntu.com natty/restricted i386 Packages [9023 B]
Get:16 http://archive.ubuntu.com natty/universe i386 Packages [6033 kB]
Get:17 http://archive.ubuntu.com natty/multiverse i386 Packages [183 kB]
Ign http://archive.ubuntu.com natty/main TranslationIndex
Ign http://archive.ubuntu.com natty/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty/restricted TranslationIndex
Ign http://archive.ubuntu.com natty/universe TranslationIndex
Get:18 http://archive.ubuntu.com natty-updates/main Sources [14 B]
Get:19 http://archive.ubuntu.com natty-updates/restricted Sources [14 B]
Get:20 http://archive.ubuntu.com natty-updates/universe Sources [14 B]
Get:21 http://archive.ubuntu.com natty-updates/multiverse Sources [14 B]
Get:22 http://archive.ubuntu.com natty-updates/main i386 Packages [14 B]
Get:23 http://archive.ubuntu.com natty-updates/restricted i386 Packages [14 B]
Get:24 http://archive.ubuntu.com natty-updates/universe i386 Packages [14 B]
Get:25 http://archive.ubuntu.com natty-updates/multiverse i386 Packages [14 B]
Ign http://archive.ubuntu.com natty-updates/main TranslationIndex
Ign http://archive.ubuntu.com natty-updates/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty-updates/restricted TranslationIndex
Ign http://archive.ubuntu.com natty-updates/universe TranslationIndex
Get:26 http://archive.ubuntu.com natty-security/main Sources [14 B]
Get:27 http://archive.ubuntu.com natty-security/restricted Sources [14 B]
Get:28 http://archive.ubuntu.com natty-security/universe Sources [14 B]
Get:29 http://archive.ubuntu.com natty-security/multiverse Sources [14 B]
Get:30 http://archive.ubuntu.com natty-security/main i386 Packages [14 B]
Get:31 http://archive.ubuntu.com natty-security/restricted i386 Packages [14 B]
Get:32 http://archive.ubuntu.com natty-security/universe i386 Packages [14 B]
Get:33 http://archive.ubuntu.com natty-security/multiverse i386 Packages [14 B]
Ign http://archive.ubuntu.com natty-security/main TranslationIndex
Ign http://archive.ubuntu.com natty-security/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty-security/restricted TranslationIndex
Ign http://archive.ubuntu.com natty-security/universe TranslationIndex
Ign http://archive.ubuntu.com natty/main Translation-en
Ign http://archive.ubuntu.com natty/multiverse Translation-en
Ign http://archive.ubuntu.com natty/restricted Translation-en
Ign http://archive.ubuntu.com natty/universe Translation-en
Ign http://archive.ubuntu.com natty-updates/main Translation-en
Ign http://archive.ubuntu.com natty-updates/multiverse Translation-en
Ign http://archive.ubuntu.com natty-updates/restricted Translation-en
Ign http://archive.ubuntu.com natty-updates/universe Translation-en
Ign http://archive.ubuntu.com natty-security/main Translation-en
Ign http://archive.ubuntu.com natty-security/multiverse Translation-en
Ign http://archive.ubuntu.com natty-security/restricted Translation-en
Ign http://archive.ubuntu.com natty-security/universe Translation-en
Fetched 13.3 MB in 31s (427 kB/s)
Reading package lists... Done
ck@Inspiron:~$ sudo dpkg --clear-avail
ck@Inspiron:~$ sudo dpkg --configure -a
Processing triggers for python-support ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
ck@Inspiron:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
ck@Inspiron:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
ck@Inspiron:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
Ign http://archive.ubuntu.com natty InRelease
Ign http://archive.ubuntu.com natty-updates InRelease
Ign http://archive.ubuntu.com natty-security InRelease
Ign http://archive.canonical.com natty InRelease
Hit http://archive.ubuntu.com natty Release.gpg
Hit http://archive.ubuntu.com natty-updates Release.gpg
Hit http://archive.canonical.com natty Release.gpg
Hit http://archive.ubuntu.com natty-security Release.gpg
Hit http://archive.ubuntu.com natty Release
Hit http://archive.canonical.com natty Release
Hit http://archive.ubuntu.com natty-updates Release
Hit http://archive.ubuntu.com natty-security Release
Hit http://archive.canonical.com natty/partner i386 Packages
Hit http://archive.ubuntu.com natty/main Sources
Hit http://archive.ubuntu.com natty/restricted Sources
Hit http://archive.ubuntu.com natty/universe Sources
Hit http://archive.ubuntu.com natty/multiverse Sources
Hit http://archive.ubuntu.com natty/main i386 Packages
Hit http://archive.ubuntu.com natty/restricted i386 Packages
Ign http://archive.canonical.com natty/partner TranslationIndex
Hit http://archive.ubuntu.com natty/universe i386 Packages
Hit http://archive.ubuntu.com natty/multiverse i386 Packages
Ign http://archive.ubuntu.com natty/main TranslationIndex
Ign http://archive.ubuntu.com natty/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty/restricted TranslationIndex
Ign http://archive.ubuntu.com natty/universe TranslationIndex
Hit http://archive.ubuntu.com natty-updates/main Sources
Hit http://archive.ubuntu.com natty-updates/restricted Sources
Hit http://archive.ubuntu.com natty-updates/universe Sources
Hit http://archive.ubuntu.com natty-updates/multiverse Sources
Hit http://archive.ubuntu.com natty-updates/main i386 Packages
Hit http://archive.ubuntu.com natty-updates/restricted i386 Packages
Hit http://archive.ubuntu.com natty-updates/universe i386 Packages
Hit http://archive.ubuntu.com natty-updates/multiverse i386 Packages
Ign http://archive.ubuntu.com natty-updates/main TranslationIndex
Ign http://archive.ubuntu.com natty-updates/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty-updates/restricted TranslationIndex
Ign http://archive.ubuntu.com natty-updates/universe TranslationIndex
Hit http://archive.ubuntu.com natty-security/main Sources
Hit http://archive.ubuntu.com natty-security/restricted Sources
Hit http://archive.ubuntu.com natty-security/universe Sources
Hit http://archive.ubuntu.com natty-security/multiverse Sources
Hit http://archive.ubuntu.com natty-security/main i386 Packages
Hit http://archive.ubuntu.com natty-security/restricted i386 Packages
Hit http://archive.ubuntu.com natty-security/universe i386 Packages
Hit http://archive.ubuntu.com natty-security/multiverse i386 Packages
Ign http://archive.ubuntu.com natty-security/main TranslationIndex
Ign http://archive.ubuntu.com natty-security/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty-security/restricted TranslationIndex
Ign http://archive.canonical.com natty/partner Translation-en
Ign http://archive.ubuntu.com natty-security/universe TranslationIndex
Ign http://archive.ubuntu.com natty/main Translation-en
Ign http://archive.ubuntu.com natty/multiverse Translation-en
Ign http://archive.ubuntu.com natty/restricted Translation-en
Ign http://archive.ubuntu.com natty/universe Translation-en
Ign http://archive.ubuntu.com natty-updates/main Translation-en
Ign http://archive.ubuntu.com natty-updates/multiverse Translation-en
Ign http://archive.ubuntu.com natty-updates/restricted Translation-en
Ign http://archive.ubuntu.com natty-updates/universe Translation-en
Ign http://archive.ubuntu.com natty-security/main Translation-en
Ign http://archive.ubuntu.com natty-security/multiverse Translation-en
Ign http://archive.ubuntu.com natty-security/restricted Translation-en
Ign http://archive.ubuntu.com natty-security/universe Translation-en
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  apt apt-transport-https apt-utils aptdaemon aptdaemon-data
  gnome-settings-daemon libgudev-1.0-0 libudev0 libwebkitgtk-1.0-0
  libwebkitgtk-1.0-common obex-data-server procps python-aptdaemon
  python-aptdaemon-gtk python-aptdaemon.gtk3widgets
  python-aptdaemon.gtkwidgets udev unattended-upgrades x11-xserver-utils
19 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.6 MB of archives.
After this operation, 455 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.ubuntu.com/ubuntu/ natty/main libudev0 i386 167-0ubuntu3 [26.6 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ natty/main libgudev-1.0-0 i386 1:167-0ubuntu3 [14.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ natty/main apt i386 0.8.13.2ubuntu2 [2100 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ natty/main apt-utils i386 0.8.13.2ubuntu2 [223 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ natty/main procps i386 1:3.2.8-10ubuntu2 [212 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ natty/main udev i386 167-0ubuntu3 [365 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ natty/main apt-transport-https i386 0.8.13.2ubuntu2 [19.0 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ natty/main libwebkitgtk-1.0-common all 1.3.13-0ubuntu1 [554 kB]
Get:9 http://archive.ubuntu.com/ubuntu/ natty/main libwebkitgtk-1.0-0 i386 1.3.13-0ubuntu1 [6261 kB]
Get:10 http://archive.ubuntu.com/ubuntu/ natty/main obex-data-server i386 0.4.6-0ubuntu1 [78.3 kB]
Get:11 http://archive.ubuntu.com/ubuntu/ natty/main unattended-upgrades all 0.72ubuntu1 [22.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu/ natty/main x11-xserver-utils i386 7.6+2 [168 kB]
Get:13 http://archive.ubuntu.com/ubuntu/ natty/main aptdaemon-data all 0.41+bzr614-0ubuntu2 [164 kB]
Get:14 http://archive.ubuntu.com/ubuntu/ natty/main python-aptdaemon-gtk all 0.41+bzr614-0ubuntu2 [4388 B]
Get:15 http://archive.ubuntu.com/ubuntu/ natty/main python-aptdaemon.gtk3widgets all 0.41+bzr614-0ubuntu2 [17.2 kB]
Get:16 http://archive.ubuntu.com/ubuntu/ natty/main python-aptdaemon.gtkwidgets all 0.41+bzr614-0ubuntu2 [16.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu/ natty/main aptdaemon all 0.41+bzr614-0ubuntu2 [15.7 kB]
Get:18 http://archive.ubuntu.com/ubuntu/ natty/main python-aptdaemon all 0.41+bzr614-0ubuntu2 [71.4 kB]
Get:19 http://archive.ubuntu.com/ubuntu/ natty/main gnome-settings-daemon i386 2.32.1-0ubuntu13 [295 kB]
Fetched 10.6 MB in 8s (1199 kB/s)
Preconfiguring packages ...
(Reading database ... 172381 files and directories currently installed.)
Preparing to replace libudev0 167-0ubuntu2 (using .../libudev0_167-0ubuntu3_i386.deb) ...
Unpacking replacement libudev0 ...
Preparing to replace libgudev-1.0-0 1:167-0ubuntu2 (using .../libgudev-1.0-0_1%3a167-0ubuntu3_i386.deb) ...
Unpacking replacement libgudev-1.0-0 ...
Preparing to replace apt 0.8.13.2ubuntu1 (using .../apt_0.8.13.2ubuntu2_i386.deb) ...
Unpacking replacement apt ...
Processing triggers for man-db ...
Setting up apt (0.8.13.2ubuntu2) ...
Installing new version of config file /etc/cron.daily/apt ...
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <email address hidden>" not changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <email address hidden>" not changed
gpg: Total number processed: 2
gpg: unchanged: 2
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
(Reading database ... 172381 files and directories currently installed.)
Preparing to replace apt-utils 0.8.13.2ubuntu1 (using .../apt-utils_0.8.13.2ubuntu2_i386.deb) ...
Unpacking replacement apt-utils ...
Preparing to replace procps 1:3.2.8-10ubuntu1 (using .../procps_1%3a3.2.8-10ubuntu2_i386.deb) ...
stop: Unknown instance:
Unpacking replacement procps ...
Preparing to replace udev 167-0ubuntu2 (using .../udev_167-0ubuntu3_i386.deb) ...
Adding 'diversion of /sbin/udevadm to /sbin/udevadm.upgrade by fake-udev'
Unpacking replacement udev ...
Preparing to replace apt-transport-https 0.8.13.2ubuntu1 (using .../apt-transport-https_0.8.13.2ubuntu2_i386.deb) ...
Unpacking replacement apt-transport-https ...
Preparing to replace libwebkitgtk-1.0-common 1.3.12-0ubuntu3 (using .../libwebkitgtk-1.0-common_1.3.13-0ubuntu1_all.deb) ...
Unpacking replacement libwebkitgtk-1.0-common ...
Preparing to replace libwebkitgtk-1.0-0 1.3.12-0ubuntu3 (using .../libwebkitgtk-1.0-0_1.3.13-0ubuntu1_i386.deb) ...
Unpacking replacement libwebkitgtk-1.0-0 ...
Preparing to replace obex-data-server 0.4.6~svn20110210-0ubuntu1 (using .../obex-data-server_0.4.6-0ubuntu1_i386.deb) ...
Unpacking replacement obex-data-server ...
Preparing to replace unattended-upgrades 0.71ubuntu1 (using .../unattended-upgrades_0.72ubuntu1_all.deb) ...
Unpacking replacement unattended-upgrades ...
Preparing to replace x11-xserver-utils 7.6~1 (using .../x11-xserver-utils_7.6+2_i386.deb) ...
Unpacking replacement x11-xserver-utils ...
Preparing to replace aptdaemon-data 0.41+bzr614-0ubuntu1 (using .../aptdaemon-data_0.41+bzr614-0ubuntu2_all.deb) ...
Unpacking replacement aptdaemon-data ...
Preparing to replace python-aptdaemon-gtk 0.41+bzr614-0ubuntu1 (using .../python-aptdaemon-gtk_0.41+bzr614-0ubuntu2_all.deb) ...
Unpacking replacement python-aptdaemon-gtk ...
Preparing to replace python-aptdaemon.gtk3widgets 0.41+bzr614-0ubuntu1 (using .../python-aptdaemon.gtk3widgets_0.41+bzr614-0ubuntu2_all.deb) ...
Unpacking replacement python-aptdaemon.gtk3widgets ...
Preparing to replace python-aptdaemon.gtkwidgets 0.41+bzr614-0ubuntu1 (using .../python-aptdaemon.gtkwidgets_0.41+bzr614-0ubuntu2_all.deb) ...
Unpacking replacement python-aptdaemon.gtkwidgets ...
Preparing to replace aptdaemon 0.41+bzr614-0ubuntu1 (using .../aptdaemon_0.41+bzr614-0ubuntu2_all.deb) ...
Unpacking replacement aptdaemon ...
Preparing to replace python-aptdaemon 0.41+bzr614-0ubuntu1 (using .../python-aptdaemon_0.41+bzr614-0ubuntu2_all.deb) ...
Unpacking replacement python-aptdaemon ...
Preparing to replace gnome-settings-daemon 2.32.1-0ubuntu12 (using .../gnome-settings-daemon_2.32.1-0ubuntu13_i386.deb) ...
Unpacking replacement gnome-settings-daemon ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for hicolor-icon-theme ...
Processing triggers for gconf2 ...
Setting up libudev0 (167-0ubuntu3) ...
Setting up libgudev-1.0-0 (1:167-0ubuntu3) ...
Setting up apt-utils (0.8.13.2ubuntu2) ...
Setting up procps (1:3.2.8-10ubuntu2) ...
procps stop/waiting
Setting up udev (167-0ubuntu3) ...
udev start/running, process 3179
Removing 'diversion of /sbin/udevadm to /sbin/udevadm.upgrade by fake-udev'
update-initramfs: deferring update (trigger activated)
Setting up apt-transport-https (0.8.13.2ubuntu2) ...
Setting up libwebkitgtk-1.0-common (1.3.13-0ubuntu1) ...
Setting up libwebkitgtk-1.0-0 (1.3.13-0ubuntu1) ...
Setting up obex-data-server (0.4.6-0ubuntu1) ...
Setting up unattended-upgrades (0.72ubuntu1) ...
Installing new version of config file /etc/apt/apt.conf.d/50unattended-upgrades ...
Setting up x11-xserver-utils (7.6+2) ...
Setting up aptdaemon-data (0.41+bzr614-0ubuntu2) ...
Setting up python-aptdaemon (0.41+bzr614-0ubuntu2) ...
Setting up python-aptdaemon.gtkwidgets (0.41+bzr614-0ubuntu2) ...
Setting up python-aptdaemon.gtk3widgets (0.41+bzr614-0ubuntu2) ...
Setting up python-aptdaemon-gtk (0.41+bzr614-0ubuntu2) ...
Setting up aptdaemon (0.41+bzr614-0ubuntu2) ...
Setting up gnome-settings-daemon (2.32.1-0ubuntu13) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.38-8-generic
ck@Inspiron:~$

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

You say that you have seen a message during the failed upgrade that 61 updates are waiting and could not be downloaded due to a crash.
The output of the apt-get commands indicates that your system is up-to-date and has all updates applied.

This is contradictory.

Can you please start software-center and look in the history what there is shown about recent installations?

Revision history for this message
JosephB (joseph-bouchard) said :
#4

Thanks Manfred Hampl, that solved my question.