PDA

View Full Version : First Ubuntu related bash script



dv5237
April 10th, 2007, 07:54 PM
Hello,

Is there a more nicer or better way to do this? Just curious.


#!/bin/bash
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean

Thanks

slavik
April 11th, 2007, 04:54 AM
you can skip upgrade and simply do dist-upgrade ...

dist-upgrade will upgrade the package even if the upgrade breaks dependancies, upgrade will only upgrade a package when the upgrade does not break dependencies.

I am not aware of any built-in options to apt-get that provides similar functionality. You also sometimes don't want to upgrade blindly. :)

dv5237
April 11th, 2007, 08:34 PM
Ok thanks ill do that