How to automatically apt-get?

Mario Vukelic mario.vukelic at dantian.org
Tue Sep 25 03:53:05 UTC 2007


On Mon, 2007-09-24 at 22:31 +0200, Josef Wolf wrote:
> Hello,
> 
> I'd like to automatically "apt-get update" and the like.  I've tried the
> following:
> 
>   #!/bin/sh
>   export DEBIAN_FRONTEND=noninteractive
>   apt-get --yes --force-yes -q update
>   apt-get --yes --force-yes -q upgrade

Are you trying to break your system on purpose? man apt-get:

--force-yes
Force yes; This is a dangerous option that will cause apt to continue
without prompting if it is doing something potentially harmful. It
should not be used except in very special situations. Using force-yes
can potentially destroy your system! Configuration Item:
APT::Get::force-yes


My suggestion would be to stop the project. Menu System > Administration
> Software Sources has the option to install security updates
automatically. That's as far as you should go.

On, and BTW, if you want to automate other things with apt-get, use the
Configuration Items instead of cmd line switches, it's much cleaner :)





More information about the ubuntu-users mailing list