update-manager says "Not enough free disk space" but there is enough space

Bug #1054903 reported by olibre
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Unity notification "Update Manager" icon -> Show updates -> Install Updates:

    Not enough free disk space
    The upgrade needs a total of 65,7 M free space on disk '/var/cache'. Please free at least an additional 65,7 M of disk space on '/var/cache'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.

There is 715 M available on /var/cache :

$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext4 90G 80G 5,4G 94% /
udev devtmpfs 3,9G 4,0K 3,9G 1% /dev
tmpfs tmpfs 789M 8,0K 789M 1% /tmp
tmpfs tmpfs 1,6G 848K 1,6G 1% /run
none tmpfs 5,0M 0 5,0M 0% /run/lock
none tmpfs 3,9G 76K 3,9G 1% /run/shm
tmpfs tmpfs 789M 0 789M 0% /var/tmp
tmpfs tmpfs 789M 656K 788M 1% /var/log
tmpfs tmpfs 789M 0 789M 0% /var/log/apt
tmpfs tmpfs 789M 74M 715M 10% /var/cache

$ sudo du -hsc /var/cache
74M /var/cache
74M total

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  dbus dbus-x11 gstreamer0.10-plugins-bad gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-fuse gvfs-libs isc-dhcp-client isc-dhcp-common kde-zeroconf kdenetwork kget kopete krdc krfb libdbus-1-3 libdbus-1-3:i386
  libgstreamer-plugins-bad0.10-0 libkopete4 openjdk-7-jre openjdk-7-jre-headless openjdk-7-jre-lib php5 php5-cgi php5-cli php5-common php5-curl php5-gd tzdata tzdata-java
33 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 65,7 MB of archives.
After this operation, 416 kB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.

However this works:
Unity notification "Update Manager" icon -> Install updates

Revision history for this message
Tamlin (storyjesse-gmail) wrote :
Download full text (4.8 KiB)

This bug affects me also.
I'm assuming it is something related to /var/cache being mounted as a tmpfs

I haven't tried the [Unity notification "Update Manager" icon -> Install updates] trick. Do you right click on the icon to get this option? When I run...
     ~$ update-manager
from a terminal it doesn't work even if I right click on the icon. How do I get the unity notification?

When running from the command line I get these warnings...

     ~$ update-manager
     WARNING:root:directory '/var/cache/apt/archives' does not exists
     ERROR:root:Not enough free space: ['/var/cache']
     WARNING:root:directory '/var/cache/apt/archives' does not exists
     ERROR:root:Not enough free space: ['/var/cache']
     gpg: /tmp/tmpGDw2Px/trustdb.gpg: trustdb created

I check manually for /var/cache/apt/archives...

     ~$ ls /var/cache/apt/
     pkgcache.bin srcpkgcache.bin

I create /var/cache/apt/archives...

     ~$ sudo mkdir /var/cache/apt/archives
     [sudo] password for jesse:

I run update-manager again...
     ~$ update-manager

SUCCESS!!!

I try installing updates...

The updates work but I get the following list of error messages in the terminal...

<quote>

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manager:20288): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkliststore.c:851: Unable to convert from glong to gint

(update-manag...

Read more...

Revision history for this message
Tamlin (storyjesse-gmail) wrote :

Oops Sorry that workaround should have been...
<quote>
if [ -d "/var/cache/apt/archives" ]; then echo "/var/cache/apt/archives exists"; else mkdir /var/cache/apt/archives; fi || die "Command failed: mkdir /var/cache/apt/archives"
</quote>

note the -d & quotes added to the test... if [ -d "/var/cache/apt/archives" ];
Without this it will always return true and never create the directory even when it doesn't exist.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Jarno Suni (jarnos) wrote :

Oh, I have only seen it complaining there is not enough space at /boot. This bug is old. Does it happen on any later release than on 12.04?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.