Page 1 of 1

How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 12:52 pm
by bigdavethehorn
Hello, I'm going to install Rasbian Wheezy for the first time tonight and if that goes well, SSH & VNC thereafter.

I've seen suggestions on this forum that you should run sudo apt-get update, but how often should I run it?

Thanks for any help!

Re: How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 1:06 pm
by AlArenal
Roughly at least once on every day before you're installing something new and once in a while followed by "sudo apt-get upgrade" to install latest patches.

Re: How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 1:13 pm
by bigdavethehorn
Coming from a Windows background, the idea of updating all installed programs (or packages) from a single command is quite alien.

Thanks for the reply!

Re: How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 1:18 pm
by mdewey
bigdavethehorn wrote:Hello, I'm going to install Rasbian Wheezy for the first time tonight and if that goes well, SSH & VNC thereafter.

I've seen suggestions on this forum that you should run sudo apt-get update, but how often should I run it?

Thanks for any help!
You do realise that apt-get update does not itself update your packages but updates the list which apt-get has of the packages on the repositories? This was not quite clear to me from your question. It is apt-get upgrade which updates all your packages.

Re: How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 1:26 pm
by bigdavethehorn
I didn't realise this at the time of my first post, but I found some useful info on the apt-get command here:

https://help.ubuntu.com/8.04/serverguide/apt-get.html

When you enter "apt-get update" will a list appear detailing all of the outdated packages on my install?

Thank you.

Re: How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 1:32 pm
by Mortimer
Sadly not. It just updates the locally held list.
Running sudo apt-get upgrade, will list what will be upgraded and then ask you whether you want to proceed or not.

Aptitude gives more detail I think, but I personally run 'sudo apt-get update && sudo apt-get dist-upgrade' at the start of my first session on the Pi in a given day. So effectively every time I log in or at least once a day, whichever is less frequent.

If I was using the RPi for an established task or service, then I wouldn't do that. The doctrine of 'If it ain't broke, don't fix it' kicks in, and I would probably look at a way to review and pick updates before installation. As I am simply using it as a personal education tool at the moment, I do as stated in the previous paragraph.

Re: How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 3:25 pm
by bigdavethehorn
Thanks Mortimer.

Re: How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 3:26 pm
by bigdavethehorn
Oh, if there are any other inexperienced Linux folk (like me) reading this, then there's no need to install SSH on Wheezy, I have read that it is installed by default.

Re: How often to run "sudo apt-get update"

Posted: Thu Aug 30, 2012 6:19 pm
by Jim JKla
Yes it is you can switch it off in raspi-config (the setup script)

Re: How often to run "sudo apt-get update"

Posted: Sat Sep 01, 2012 12:25 pm
by Montala
I also come from a Windows 'background' and am quite frankly surprised at the number of 'updates' and 'upgrades' already available, even for the latest 'official' version of Raspbian "wheezy", dated 8th August.

They probably aren't all strictly necessary, but I do not have the knowledge or expertise to know which ones I need (or don't need!) anyway, so I tend to accept them all.

I am one of those who believe that it is always good to have the latest versions of any program, but I know that some folks think differently, and prefer to work on the "if it ain't broke, then don't try to fix it" principle! ;)

Re: How often to run "sudo apt-get update"

Posted: Sat Sep 01, 2012 1:28 pm
by Alvaro
Montala wrote: I am one of those who believe that it is always good to have the latest versions of any program, but I know that some folks think differently, and prefer to work on the "if it ain't broke, then don't try to fix it" principle! ;)
I realize it is not easy to grasp the Debian release cycle, but it releases new stable versions roughly every two years.

Debian consists of several branches - experimental (for developers), sid (still in development), testing (means testing) and stable (really stable). :)

Raspbian is a custom Debian testing. About every six months or so before the initial release, testing is frozen, until it becomes the new stable. Testing/Wheezy froze this summer. (After that, testing starts rolling again.) It means no new versions of anything from the Debian repositories, just bugfixes and security fixes. (I understand it is a little more complex than that for Raspbian, since some applications are custom for the raspberry pi and grabbed from git, like omxplayer.)

What I am trying to say is: No upgrades = no bugfixes and no security fixes.

Re: How often to run "sudo apt-get update"

Posted: Sat Sep 01, 2012 1:35 pm
by Montala
Thanks... but just to clarify... I am all for the updates (& upgrades), and make sure I install them regularly.

It was just the number, and frequency, of them which rather surprised me!

Re: How often to run "sudo apt-get update"

Posted: Sat Sep 01, 2012 2:48 pm
by Alvaro
Montala wrote:Thanks... but just to clarify... I am all for the updates (& upgrades), and make sure I install them regularly.

It was just the number, and frequency, of them which rather surprised me!
Testing is always like that. It will calm down once stable is released. Just the occasional security fix then.

Re: How often to run "sudo apt-get update"

Posted: Sat Sep 01, 2012 2:55 pm
by Jim JKla
Technically we can't get to the fist stable release till the first release is six months old. ;)

Saying that it seems to be fairly stable now.