On system with gnome-packagekit installed /var/cache/yum consuming disk space
Environment
- Red Hat Enterprise Linux (RHEL) 7
- gnome-packagekit
Issue
Within 24 hours after running a yum clean all and not performing any other package maintenance, /var/cache/yum continues to grow due to RPM packages being downloaded.
Resolution
-
To disable the automatic download of updates
-
For all users, do following as root
# cd /usr/share/glib-2.0/schemas/ # echo "[org.gnome.settings-daemon.plugins.updates]" > 99_org.gnome.settings-daemon.plugins.updates.gschema.override # echo "auto-download-updates=false" >> 99_org.gnome.settings-daemon.plugins.updates.gschema.override # glib-compile-schemas /usr/share/glib-2.0/schemas/ # gsettings get org.gnome.settings-daemon.plugins.updates auto-download-updates false -
For specific user, do following as the user
$ gsettings set org.gnome.settings-daemon.plugins.updates auto-download-updates false
-
-
To disable the auto check entirely
-
For all users, do following as root
# cd /usr/share/glib-2.0/schemas/ # echo "[org.gnome.settings-daemon.plugins.updates]" > 99_org.gnome.settings-daemon.plugins.updates.gschema.override # echo "frequency-get-updates=0" 99_org.gnome.settings-daemon.plugins.updates.gschema.override # echo "frequency-get-upgrades=0" >> 99_org.gnome.settings-daemon.plugins.updates.gschema.override # glib-compile-schemas /usr/share/glib-2.0/schemas/ # gsettings get org.gnome.settings-daemon.plugins.updates frequency-get-updates 0 # gsettings get org.gnome.settings-daemon.plugins.updates frequency-get-upgrades 0 -
For specific user, do following as the user
$ gsettings set org.gnome.settings-daemon.plugins.updates frequency-get-updates 0 $ gsettings set org.gnome.settings-daemon.plugins.updates frequency-get-upgrades 0
-
Root Cause
When using GNOME desktop with gnome-packagekit installed the system will check and download any new updates every 24 hours by default.
Diagnostic Steps
-
Looking at syslog, it may be possible to match the following log entries with the time that packages are being downloaded to
/var/cache/yumand or/tmp/yum_save*files. Here is an example:# ls -lart /tmp/yum_save_tx* | tail -n 1 -rw------- 1 root root 299400 Jan 27 18:29 /tmp/yum_save_tx.2015-01-27.18-29.STRFgM.yumtx Jan 27 18:29:41 hostname dbus-daemon: dbus[2269]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper) Jan 27 18:29:41 hostname dbus[2269]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper) Jan 27 18:29:41 hostname dbus-daemon: dbus[2269]: [system] Successfully activated service 'org.freedesktop.PackageKit' Jan 27 18:29:41 hostname dbus[2269]: [system] Successfully activated service 'org.freedesktop.PackageKit' -
Here is the upstream commit that changed
gnome-settings-daemonto auto download packages -
Here is a list of all the options on a freshly install RHEL 7 system
# gsettings list-recursively org.gnome.settings-daemon.plugins.updates org.gnome.settings-daemon.plugins.updates active true org.gnome.settings-daemon.plugins.updates auto-download-updates true org.gnome.settings-daemon.plugins.updates banned-firmware '*/intel-ucode/*' org.gnome.settings-daemon.plugins.updates connection-use-mobile false org.gnome.settings-daemon.plugins.updates enable-check-firmware true org.gnome.settings-daemon.plugins.updates frequency-get-updates 86400 org.gnome.settings-daemon.plugins.updates frequency-get-upgrades 604800 org.gnome.settings-daemon.plugins.updates frequency-refresh-cache 86400 org.gnome.settings-daemon.plugins.updates frequency-updates-notification 604800 org.gnome.settings-daemon.plugins.updates ignored-devices '' org.gnome.settings-daemon.plugins.updates last-updates-notification uint64 0 org.gnome.settings-daemon.plugins.updates media-repo-filenames 'media.repo,.discinfo' org.gnome.settings-daemon.plugins.updates notify-distro-upgrades false org.gnome.settings-daemon.plugins.updates priority 0 org.gnome.settings-daemon.plugins.updates update-battery false
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
