Updates – How to Automatically Update Atom Editor

atomupdates

Automatic update of Atom feature is not yet supported for Ubuntu. From their GitHub repository:

Currently only a 64-bit version is available.

Download atom-amd64.deb from the Atom releases page. Run sudo dpkg
–install atom-amd64.deb on the downloaded package. Launch Atom using the installed atom command. The Linux version does not currently
automatically update so you will need to repeat these steps to upgrade
to future releases.

I tried using Webupd8 PPA but it doesn't work for me.

Best Answer

TL;DR If you do not want to use the PPA, you can use a script to download and automatically install via cron.


  1. Create a new file atom-auto-update

    sudo nano /usr/local/bin/atom-auto-update
    
  2. Add the following lines

    #!/bin/bash
    wget -q https://github.com/atom/atom/releases/latest -O /tmp/latest
    wget -q $(awk -F '[<>]' '/href=".*atom-amd64.deb/ {match($0,"href=\"(.*.deb)\"",a); print "https://github.com/" a[1]} ' /tmp/latest) -O /tmp/atom-amd64.deb
    dpkg -i /tmp/atom-amd64.deb
    
  3. Save the file and make it executable

    sudo chmod +x /usr/local/bin/atom-auto-update
    
  4. Test the script

    sudo atom-auto-update
    
  5. Create a cronjob for the script

    sudo crontab -e
    
  6. Add this line

    e.g.: at 10 am every week

    0 10 * * 1 /usr/local/bin/atom-auto-update
    

    e.g.: at 10 am every day

    0 10 * * * /usr/local/bin/atom-auto-update      
    

Explanation

  • wget -q https://github.com/atom/atom/releases/latest -O /tmp/latest

    Download the site with the latest version information

  • wget -q $(awk -F '[<>]' '/href=".*atom-amd64.deb/ {match($0,"href=\"(.*.deb)\"",a); print "https://github.com/" a[1]} ' /tmp/latest) -O /tmp/atom-amd64.deb

    1. … awk -F '[<>]' '/href=".*atom-amd64.deb/ {match($0,"href=\"(.*.deb)\"",a); print "https://github.com/" a[1]} ' /tmp/latest …

      Extract the download link

    2. wget -q $( … ) -O /tmp/atom-amd64.deb

      Download the DEB file

  • dpkg -i /tmp/atom-amd64.deb

    Install the DEB file

Related Question