5

I have about 5 (I think) Raspberry Pis now and I was wondering how to upgrade them all without them all having to download every package.

1 Answer 1

7

I found a quick way to upgrade multiple Pis is by first upgrading one pi.

  1. Put in a USB flash and mount it:

    sudo mkdir -p /mnt/usb; sudo mount /dev/sda1 /mnt/usb)

  2. tar cf /mnt/usb/up.tar /var/cache/apt/archives
  3. sudo umount /mnt/usb
  4. Insert USB flash in other Pis to be upgraded and mount it.
  5. At the terminal type: tar xf /mnt/usb/up.tar
  6. cd var/cache/archives
  7. sudo cp -n *.deb /var/cache/apt/archives
  8. sudo apt-get upgrade
  9. cd ..; rm -rf var

Now the upgrade will already have all the files and it will not download anything making upgrades tons faster.

4
  • I removed the "community wiki" status here -- you don't have to use that. See: raspberrypi.stackexchange.com/help/privileges/… ).
    – goldilocks
    Dec 7, 2014 at 13:51
  • 1
    Ah thanks; first time I've ever posted one that I answered
    – linuxgnuru
    Dec 7, 2014 at 13:54
  • If you don't care about downloading, you could use multiple SSH ( Pssh )
    – NicoJuicy
    Dec 9, 2014 at 12:22
  • 2
    A more hands free approach could be to do this with rsync. Sure you still have the network load, but at least it's entirely internal. The speed from reading across the local network should be fairly similar to that of a USB drive.
    – Jacobm001
    Dec 9, 2014 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.