(EDITED on 10/24/08 )
i have just made a bash script that allows me to run
in one bash script. all i have to do is type into a command prompt and the commands will be run. (it used to be 4 commands until somebody suggested i also add "apt-get check". now its 5.
heres how I did it:
WARNING: this will update every package on your computer including the kernel and xorg. it is possible this could lead to breakages so be careful and read everything in the terminal before agreeing to update.
1) i created a directory in my home folder called "bash" (~/bash). This is where I want to copy all custom bash scripts into.
2) I created a file called "updateall" (without quotes) and I put the file into this bash directory. What I wrote into "updateall" is this:
I saved it. so now we have a file located at ~/bash/updateall
#script to run several apt-get commands at once!
apt-get check &&
apt-get update &&
apt-get dist-upgrade &&
apt-get autoremove --purge &&
3) I created a file in my home directory called ".bash_aliases" (without quotes)
4) Inside this .bash_aliases I wrote this:
5) I restarted bash by logging out and re-logging in.
alias apt5='sudo sh ~/bash/updateall'
thats it! now, no matter where I am in my command prompt, I type and my computer will run an apt-get check, apt-get update, apt-get dist-upgrade, apt-get autoclean, and apt-get autoremove.
This has saved me countless typing and I hope it can help a lot of other people here that use apt-get instead of the normal update-manager to install updates.