• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 7 : How to enable or disable automatic updates (via packagekit)

By admin

PackageKit is the graphical software updater in RedHat based linux distributions. The posts outlines the steps required to enable or disable the automatic updates via the PackageKit updater.

Disabling PackageKit

1. Check the status of PackageKit service.

# systemctl status packagekit
● packagekit.service - PackageKit Daemon
   Loaded: loaded (/usr/lib/systemd/system/packagekit.service; static; vendor preset: disabled)
   Active: active (running) since Tue 2018-03-27 15:41:45 UTC; 1s ago
 Main PID: 2334 (packagekitd)
   CGroup: /system.slice/packagekit.service
           └─2334 /usr/libexec/packagekitd

Mar 27 15:41:45 geek.mylabserver.com systemd[1]: Starting PackageKit Daemon...
Mar 27 15:41:45 geek.mylabserver.com PackageKit[2334]: daemon start
Mar 27 15:41:45 geek.mylabserver.com systemd[1]: Started PackageKit Daemon.

2. To disable auto update to happen via PackageKit, we need to stop the “packagekit” service and disable it permanently.

# systemctl stop packagekit
# systemctl mask packagekit
Created symlink from /etc/systemd/system/packagekit.service to /dev/null.

3. To completely remove the PackageKit software updater, use the below command.

# yum remove PackageKit*

Dependencies Resolved

==============================================================================================================================================================
 Package                                          Arch                         Version                                    Repository                     Size
==============================================================================================================================================================
Removing:
 PackageKit                                       x86_64                       1.1.5-1.el7.centos                         @base                         2.6 M
 PackageKit-glib                                  x86_64                       1.1.5-1.el7.centos                         @base                         480 k
 PackageKit-yum                                   x86_64                       1.1.5-1.el7.centos                         @base                         301 k
Removing for dependencies:
 cockpit-packagekit                               x86_64                       160-1.el7.centos                           @extras                       175 k
 gnome-packagekit                                 x86_64                       3.22.1-2.el7                               @base                         0.0  
 gnome-packagekit-common                          x86_64                       3.22.1-2.el7                               @base                         6.3 M
 gnome-packagekit-installer                       x86_64                       3.22.1-2.el7                               @base                         198 k
 gnome-packagekit-updater                         x86_64                       3.22.1-2.el7                               @base                         194 k

Transaction Summary
==============================================================================================================================================================
Remove  3 Packages (+5 Dependent packages)

Installed size: 10 M
Is this ok [y/N]: 

Enabling PackageKit

1. If you want to enable the PackageKit updater, first reinstall the packages you removed while disabling it.

# yum install gnome-packagekit PackageKit-yum

Dependencies Resolved

===============================================================================================================================================================
 Package                                           Arch                          Version                                     Repository                   Size
===============================================================================================================================================================
Installing:
 PackageKit-yum                                    x86_64                        1.1.5-1.el7.centos                          base                         75 k
 gnome-packagekit                                  x86_64                        3.22.1-2.el7                                base                        7.4 k
Installing for dependencies:
 PackageKit                                        x86_64                        1.1.5-1.el7.centos                          base                        583 k
 PackageKit-glib                                   x86_64                        1.1.5-1.el7.centos                          base                        127 k
 gnome-packagekit-common                           x86_64                        3.22.1-2.el7                                base                        1.1 M
 gnome-packagekit-installer                        x86_64                        3.22.1-2.el7                                base                         78 k
 gnome-packagekit-updater                          x86_64                        3.22.1-2.el7                                base                         74 k

Transaction Summary
===============================================================================================================================================================
Install  2 Packages (+5 Dependent packages)

Total download size: 2.0 M
Installed size: 10 M
Is this ok [y/d/N]: y

2. Unmask the packagekit service first before starting it.

# systemctl unmask packagekit
Removed symlink /etc/systemd/system/packagekit.service.
# systemctl start packagekit

3. Verify the status if the service.

# systemctl status packagekit
● packagekit.service - PackageKit Daemon
   Loaded: loaded (/usr/lib/systemd/system/packagekit.service; static; vendor preset: disabled)
   Active: active (running) since Tue 2018-03-27 15:47:26 UTC; 6s ago
 Main PID: 2522 (packagekitd)
   CGroup: /system.slice/packagekit.service
           └─2522 /usr/libexec/packagekitd

Mar 27 15:47:26 geek.mylabserver.com systemd[1]: Starting PackageKit Daemon...
Mar 27 15:47:26 geek.mylabserver.com PackageKit[2522]: daemon start
Mar 27 15:47:26 geek.mylabserver.com systemd[1]: Started PackageKit Daemon.

4. Enable the packagekit service to start at boot using the below command.

# systemctl enable packagekit
Yum Command Fails with “Another app is currently holding the yum lock” in CentOS/ RHEL 7

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. Linux OS Service ‘sshd’
  2. What is SUID, SGID and Sticky bit ?
  3. CentOS / RHEL : How to create new LVM based swap partition
  4. CentOS / RHEL 7 : How to modify the kernel command line
  5. How to disable write access to USB devices using “hdparm” tool
  6. How to Create Yum Repository For System Packages Installation in CentOS/RHEL
  7. CentOS / RHEL 7 : How to configure VLAN Tagging using nmcli
  8. CentOS / RHEL : How to remove a mirror with mdadm
  9. How to Transfer files securely using SCP Command in Linux
  10. CentOS / RHEL 5,6 : How to reinstall GRUB loader from rescue mode

You May Also Like

Primary Sidebar

Recent Posts

  • Basics of client connectivity in Oracle Data Guard configuration
  • ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  • How to relocate the redo log files to a different location on disk
  • Oracle Database: Redo log operations (Add/Drop/Change Location)
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary