Page 1 of 2 12 LastLast
Results 1 to 10 of 21

Thread: Automatic Updates

Hybrid View

  1. #1
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,289
    Distro
    Xubuntu

    Automatic Updates

    Hi.

    I want to setup Automatic Updates for a relatives laptop.

    Are all of these steps proper and safe? Also, please answer my questions in bold below.

    Thanks.

    -- What does "-plow" do?
    Code:
    sudo apt-get install unattended-upgrades
    sudo dpkg-reconfigure -plow unattended-upgrades
    Select YES when prompted.

    ----------

    Code:
    gksudo gedit /etc/apt/apt.conf.d/10periodic
    Change like so. 1 means it will update every day. 7 is weekly. -- What would 0 signify?
    -- What do these 4 lines mean exactly?
    Code:
    APT::Periodic::Update-Package-Lists "1";
    APT::Periodic::Download-Upgradeable-Packages "1";
    APT::Periodic::AutocleanInterval "7";
    APT::Periodic::Unattended-Upgrade "1";
    ----------

    gksudo gedit /etc/apt/apt.conf.d/50unattended-upgrades
    Then edit file and uncomment lines as shown.
    -- What do these 2 lines mean exactly?
    Code:
    "${distro_id}:${distro_codename}-security";
    "${distro_id}:${distro_codename}-updates";
    To auto remove unneeded packages, edit line at file end like so:
    --Is this necessary?
    Code:
    Unattended-Upgrade::Remove-Unused-Dependencies "true";
    Last edited by Rytron; July 19th, 2013 at 09:46 AM.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  2. #2
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Automatic Updates

    Quote Originally Posted by Rytron View Post
    -- What does "-plow" do?
    Also ask low-priority questions that usually don't get asked during install. See dpkg-reconfigure(8). Usually not needed when running dpkg-reconfigure from command-line as it defaults to --priority=low in this case. Note that default priority may be changed in debconf.conf.

    Quote Originally Posted by Rytron View Post
    -- What would 0 signify?
    0=disable. See /usr/share/doc/apt/examples/configure-index.gz

    Quote Originally Posted by Rytron View Post
    -- What do these 4 lines mean exactly?
    Again, see /usr/share/doc/apt/examples/configure-index.gz

    Quote Originally Posted by Rytron View Post
    -- What do these 2 lines mean exactly?
    See comments in /etc/apt/apt.conf.d/50unattended-upgrades

    Quote Originally Posted by Rytron View Post
    --Is this necessary?
    It's optional, but it makes your system tidier as it removes unneeded cruft.
    Last edited by schragge; March 27th, 2013 at 10:46 PM.

  3. #3
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,289
    Distro
    Xubuntu

    Re: Automatic Updates

    Quote Originally Posted by schragge View Post
    Hi schragge.

    Could you explain the 6 lines in plain English? Those links are not very clear.

    Thanks.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  4. #4
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Automatic Updates

    Quote Originally Posted by Rytron View Post
    Could you explain the 6 lines in plain English?
    From /usr/share/doc/apt/examples/configure-index.gz:
    // control parameters for cron jobs by /etc/cron.daily/apt
    Periodic
    {
    ...
    Update-Package-Lists "0";
    // - Do "apt-get update" automatically every n-days (0=disable)
    //
    Download-Upgradeable-Packages "0";
    // - Do "apt-get upgrade --download-only" every n-days (0=disable)
    //
    Unattended-Upgrade "0";
    // - Run the "unattended-upgrade" security upgrade script
    // every n-days (0=disabled)
    // Requires the package "unattended-upgrades" and will write
    // a log in /var/log/unattended-upgrades
    //
    AutocleanInterval "0";
    // - Do "apt-get autoclean" every n-days (0=disable)
    ...
    };
    Sorry, I'm afraid I cannot explain it better. As to the meaning of -security and -updates in the second link, see community/Repositories#A_Quick.2C_Tongue-in-cheek_Description_of_the_Ubuntu_Repositories and community/UbuntuUpdates.

  5. #5
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,289
    Distro
    Xubuntu

    Re: Automatic Updates

    Cheers schragge.

    I appreciate your help.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  6. #6
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,289
    Distro
    Xubuntu

    Re: Automatic Updates

    Is this a good method?

    From: http://askubuntu.com/questions/45797...tes-in-kubuntu

    sudo dolphin

    Create file named 'autoupdate' in /etc/cron.* (where * is hourly, daily, weekly, monthly depending on your preference).

    Put following contents into file:

    Code:
    #!/bin/bash
    apt-get update
    apt-get upgrade -y
    apt-get autoclean
    Allow file to be executed via properties or by using this: sudo chmod 755 autoupdate
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  7. #7
    Join Date
    Apr 2006
    Location
    Ubuntuland
    Beans
    2,124
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Automatic Updates

    man apt-get

    You can use cron and the -y option
    24 beers in a case, 24 hours in a day. Coincidence? I think not!

    Trusty Tahr 64 bit, AMD Phenom II 955 Quad Core 3.2GHz, GeForce 9600 GT
    16G PC2-6400 RAM, 128 GB SSD, Twin 1TB SATA 7200 RPM RAID0

  8. #8
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,289
    Distro
    Xubuntu

    Re: Automatic Updates

    Quote Originally Posted by Slim Odds View Post
    man apt-get

    You can use cron and the -y option
    Hi Slim Odds. Please elaborate.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  9. #9
    Join Date
    Jul 2009
    Beans
    409
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Automatic Updates

    Quote Originally Posted by Rytron View Post
    Hi Slim Odds. Please elaborate.
    As he said, take a look at the man page for the apt-get command:
    -y, --yes, --assume-yesAutomatic yes to prompts; assume "yes" as answer to all prompts and
    run non-interactively. If an undesirable situation, such as
    changing a held package, trying to install a unauthenticated
    package or removing an essential package occurs then apt-get will
    abort. Configuration Item: APT::Get::Assume-Yes.
    Which means it'll work non-interactively and can thus be scheduled via cron.
    Mark your thread as [SOLVED], use Thread Tools on forum page.

  10. #10
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Automatic Updates

    No, this won't cause a release upgrade by itself. Moreover, even
    Code:
    apt-get dist-upgrade
    won't, despite the name. But if you change the /etc/apt/sources.list to point to another release, or just add lines for a newer release to this file then both upgrade and dist-upgrade will do a distribution upgrade. This is essentialy what command do-release-upgrade does: it changes /etc/apt/sources.list to point to another release, then runs apt-get to do the actual upgrade.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •