Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum

system upgrade

Started by travica77, June 11, 2015, 02:29:20 PM

Previous topic - Next topic


how can i do that system upgrade can update automaticly and then shutdown computer 


apt-get update && apt-get dist-upgrade && poweroff
Nothing is easy as it looks. Danielle Steel
Join at [url="//"][/url]


Quote from: pavroo on June 11, 2015, 03:48:44 PM
apt-get update && apt-get dist-upgrade && poweroff

ok, tkanks, how abaout cron job.


you could cron that but I would not recommend it.  In fact I would not recommend the above command either, though it's your system and you can do as you wish. 

Apt is doing some pretty serious stuff and not watching/interacting with apt when running a SID distro is really dangerous.  The reason is that SID is by definition unstable, yep we have all been so pampered by the Debian folks that we seem to forget this.  Occasionally (maybe once or twice a year at random times but possibly for as long as a week) SID and the repos are going to be in transition, this means that things will be removed that you don't want removed or broken that are essential.  There will be times where you need to see what apt is doing, actually read it and say -- nope not right now, I'll wait till it calms down.  Really you should pay attention to what apt is doing in detail at every upgrade.

I hate to sound like an old fart but I grew up in the original Aptosid world back when SID was really goofy and have borked more than my fair share of distro's in my day.  I can promise you that you might get away with automagically upgrading for a while but eventually it will bite you and bite you hard.  SID is technically cutting edge and that means the edge can and will cut.  Oops this is sounding lectury and I don't mean that.  Anywho, yes you can put that command in roots cron jobs pretty easily, just know there will be consequences.


Sparky is based on Testing, not Sid.

Anyway I would prefer
sudo apt-get update && sudo apt-get dist-upgrade && sudo poweroff
See for the reason (see "Why sudo?").

But either way sometimes the upgrade process will stop halfway to ask whether to keep a configuration file or not so it is advisable to keep an eye on the system. Don't start it and go to bed. You might wake up next morning with your computer still waiting for you to type Y or N.

I would avoid running this as a cron job. Better run it consciously.
Tower and Notebook: Sparky (testing) 64bit MATE

View the most recent posts on the forum