I have this small script deployed on any of my #Debian based systems, it just does all the update, upgrade, dist-upgrade, autoremove and autoclean in one run.
#!/bin/sh if [ $# -eq 0 ]; then su -c "apt-get update && apt-get upgrade && apt-get dist-upgrade && apt-get update && apt-get autoremove && apt-get autoclean" else su -c "apt-get update && apt-get upgrade && apt-get dist-upgrade && apt-get update && apt-get install $@ && apt-get autoremove && apt-get autoclean" fi
I have this script deployed in a lazy manner, I just have it sitting in my users home folder and called it “up”, I did do a “chmod +x up” and just start it like this:
It also accepts one package name as an argument and can be called like this:
sudo ~/up package
This will then install “package”.
I am not sure where I found this, but I surely did find this somewhere in the internet and just took it from there, you thanks to who ever put this together.
1 thought on “Debian based full updates in one command”
Comments are closed.