Home > bash, ubuntu > Update script

Update script

For updating my Ubuntu, I use the following script:

#!/usr/bin/bash

# good_shape.sh

sudo dpkg --configure -a\
&& sudo apt-get -f install\
&& sudo apt-get --fix-missing install\
&& sudo apt-get clean\
&& sudo apt-get update\
&& sudo apt-get upgrade\
&& sudo apt-get dist-upgrade\
&& sudo apt-get clean\
&& sudo apt-get autoremove

As it calls apt-get clean, it’ll remove the previously downloaded .deb packages which is usually no problem. If you don’t want that, here is a modified version of the same same script without apt-get clean:

#!/usr/bin/bash

# good_shape_safe.sh

sudo dpkg --configure -a\
&& sudo apt-get -f install\
&& sudo apt-get --fix-missing install\
&& sudo apt-get update\
&& sudo apt-get upgrade\
&& sudo apt-get dist-upgrade\
&& sudo apt-get autoremove

I execute this script every day if I don’t forget that.

Advertisements
Categories: bash, ubuntu Tags: ,
  1. No comments yet.
  1. January 2, 2011 at 09:17

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: