Ubuntu – Fully automatic updates in Kubuntu

automationkdekubuntuupdates

It is really annoying to click the update icon and enter password every time to confirm updates.

How can I setup fully automatic updates without any prompts? (Not only security updates)
Some small notification about finished updates would also be nice.

I'm using Kubuntu 11.04 and KPackageKit.

Best Answer

  • Open the file manager as super user, e.g. sudo dolphin
    Be careful with such instance of file manager because you may delete something important and break your system
  • Create a file named autoupdate in /etc/cron.* (where * is hourly, daily, weekly, monthly depending on your preference). I used /etc/cron.hourly/.
  • Put the following contents into the file:

    #!/bin/bash
    apt-get update
    apt-get upgrade -y
    apt-get autoclean
    

    ... and save it.

  • Allow the file to be executed in its properties, or by using this: sudo chmod 755 autoupdate

And that's it! You will have your software automatically updated without any notifications
(of course, if you've turned off the notifications in update settings).
Thanks to boehj for the source of information: Automatic Weekly Package Updates Using Cron And Apt-Get

Related Question