Topic: update properly?

In pre-statler #! it was so simple to do superkey-u every once in a while to update, but in statler I'm not sure what to use, seeing different terms in some posts.
In my conky I pasted this (copied from my older crunchbang)

Update:$alignr${execi 3600 aptitude search "~U" | wc -l}

Now when I see there's some updates available, should I do

sudo apt-get update

and then

sudo apt-get dist-upgrade

or maybe

sudo apt-get update && apt-get dist-upgrade -y

(got this one from Ubuntu forums).

Or, since statler is still alfa, leave everything as it is and don't do any of these?

#!+mocp=music in my ears

Re: update properly?

I would recommend a `safe-upgrade` (or just `upgrade` with apt-get) instead of `full-upgrade` or `dist-upgrade`. The latter is more likely to break packages, especially in statler. Only use a full upgrade when certain packages you know you need/want are being held.

sudo aptitude update && sudo aptitude safe-upgrade

Re: update properly?

the man pages might explain the different commands about apt-get in the correct way, ("man apt-get") but i can try some explanation too:

"update" will just update your database about available versions and programs. it will not change software, but it is always a good idea to run it before any other command.

"upgrade" and "dist-upgrade" mainly just differ in there strictness about installing or removing old/new dependencies and versions

"-y" = assume yes to all questions

"&&" is a bash junktor which executes the second command only if the first one exits with status 0 (true/no errors)

hope this helps
luc

Re: update properly?

catch22 wrote:

Now when I see there's some updates available, should I do

sudo apt-get update

and then

sudo apt-get dist-upgrade

This is what I would do smile

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: update properly?

I also use 'apt-get dist-upgrade' (preceded by 'apt-get update' of course). Using 'apt-get upgrade' is arguably OK for a stable release, but a bad idea for a rapidly changing development release like Debian Testing.

I never use the -y switch. I want to read what's going to happen first before I say yes!

One very cool way to upgrade a Debian-based system is the script from smxi.org. It safely walks you through the upgrade, and gives a lot of other cool options too.

Re: update properly?

Thanks all of you for the clear explanations.
I'll stick to 

sudo apt-get update

and then

sudo apt-get dist-upgrade

smxi.org looks interesting for in the distant future - in my case anyway; it's slightly out of my league at this point cool

#!+mocp=music in my ears

Re: update properly?

FYI 'cb-welcome' (the script that runs on #! Statler's first boot after install) uses 'dist-upgrade'.

smxi is not necessary of course (and isn't officially supportive-of/sanctioned-by CrunchBang anyhow), just a fun alternative. smile

Re: update properly?

anonymous wrote:
catch22 wrote:

Now when I see there's some updates available, should I do

sudo apt-get update

and then

sudo apt-get dist-upgrade

This is what I would do smile

As expected, you're quite daring anonymous, aren't you? You go at full arch-way! wink

Anyway, I would do like Ceil does: a simple apt-get upgrade: this simply upgrade packages without pulling in any other new packages. If new packages are needed to upgrade or others need to be removed, it doesn't upgrade the package you're trying to upgrade.

At that point, if you really need to upgrade that package we're talking about, you can do a dist-upgrade, which will pull in and remove all the needed additional packages.

Anyway, it is also true that in rolling release full upgrades (dist-upgrade) maintain the system fully up to date, since the system changes really fast and very often, but they can be risky sometimes.

Re: update properly?

xaber wrote:

Anyway, it is also true that in rolling release full upgrades (dist-upgrade) maintain the system fully up to date, since the system changes really fast and very often, but they can be risky sometimes.

Squeeze at the moment is still at the "testing" phase, bugs are being fixed and sometimes packages are removed, so dist-upgrade is probably necessary right now to keep up to date.

John
------------------------
( a boring Japan blog , and idle twitterings )
“Good morning sir, which way up would you like your reality today?”  "As it comes, Jeeves, as it comes..."

Re: update properly?

johnraff wrote:
xaber wrote:

Anyway, it is also true that in rolling release full upgrades (dist-upgrade) maintain the system fully up to date, since the system changes really fast and very often, but they can be risky sometimes.

Squeeze at the moment is still at the "testing" phase, bugs are being fixed and sometimes packages are removed, so dist-upgrade is probably necessary right now to keep up to date.

Yea I know and that's why, if you want to upgrade correctly and totally, you must launch a dist-upgrade: otherwise your upgrade will be partial.
I am only arguing that, if at a certain moment you don't need a certain update which requires dist-upgrade, you can worrilessly decide to skip it, sticking to a simple upgrade.
I suggest to do a dist-upgrade only if you have the time and will to deal with eventual problems/fixings.
Otherwise, if possible, you should decide to run a simple upgrade.

Obviously, that's only my point of view: it's a bit of utilitaristic, but quite useful I believe! wink I've always used #! at full power also with a simple upgrade when I did not need a complete dist-upgrade.

Re: update properly?

xaber wrote:

Yea I know and that's why, if you want to upgrade correctly and totally, you must launch a dist-upgrade: otherwise your upgrade will be partial.
I am only arguing that, if at a certain moment you don't need a certain update which requires dist-upgrade, you can worrilessly decide to skip it, sticking to a simple upgrade.
I suggest to do a dist-upgrade only if you have the time and will to deal with eventual problems/fixings.
Otherwise, if possible, you should decide to run a simple upgrade.

If you don't have time to deal with problems/fixings, just don't update. wink I usually update at the end of the day Friday so if there is a problem I can fix it over the weekend. Sometimes if my system is running perfectly I go for weeks at a time. I try never to update/install/troubleshoot when I'm in a hurry, because that's how mistakes happen.

If there is a single package you want to skip updating (maybe you suspect the newer version will cause problems) I do not recommend a partial upgrade but rather go into Synaptic, select the package, go to the Package menu, and choose Lock Version (but take notes so you remember to unlock the package at a future date when you believe it's safe). Also the smxi.org script I mentioned previously is very good about warning you of potential problems.

Here's a good overview of upgrade vs. dist-upgrade in Sid, which I think applies as well to Testing: http://manual.aptosid.com/en/sys-admin- … pt-upgrade

To reiterate, my opinion expressed above is limited to the next couple of months while Squeeze is in its Testing phase. Once Squeeze goes Stable, it is a different conversation.

Re: update properly?

Yes, it could be another good solution too! It also happened to me not to upgrade for weeks!

Re: update properly?

snowpine wrote:

...If there is a single package you want to skip updating (maybe you suspect the newer version will cause problems) I do not recommend a partial upgrade but rather go into Synaptic, select the package, go to the Package menu, and choose Lock Version (but take notes so you remember to unlock the package at a future date when you believe it's safe). Also the smxi.org script I mentioned previously is very good about warning you of potential problems...

I've been wondering about that; how to update but leave certain packages be. Useful info, thanks!

#!+mocp=music in my ears

Re: update properly?

Isn't there an option or a variable in any apt-get configuration file in which to specify the packages you would like to ignore during updatings? Like the IGNOREPKG variable in the pacman configuration file in Arch: it would be really useful, letting you avoid all the nuisance of using synaptic, which I personally can't stand!

Re: update properly?

@xaber - pinning.

http://www.debian.org/doc/manuals/apt-h … html#s-pin

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: update properly?

xaber wrote:

Isn't there an option or a variable in any apt-get configuration file in which to specify the packages you would like to ignore during updatings? Like the IGNOREPKG variable in the pacman configuration file in Arch: it would be really useful, letting you avoid all the nuisance of using synaptic, which I personally can't stand!

Anything you can do with a GUI config tool in Linux (such as Synaptic) can also be accomplished by editing a text file... lots of Linux boxes don't have X. smile

In Debian it is /etc/apt/preferences I believe.

Re: update properly?

Many thanks Anonymous! Nice as ever! wink

Re: update properly?

Here is what ive been using,I asked the same question when Statler 1 came out,It also works in Alpha2.
And it also has instructions for making a keybind Super-U.

Thanks to Benj1 for the script.

http://crunchbanglinux.org/forums/topic … m-updates/

I just did a statler alpha 2 install on my newer netbook and this script works well.