I have this small script deployed on any of my based systems, it just does all the update, upgrade, dist-upgrade, autoremove and autoclean in one run.

#!/bin/sh 

if [ $# -eq 0 ]; then
  sudo sh -c "apt-get update && apt-get upgrade && apt-get dist-upgrade && apt-get update && apt-get autoremove && apt-get autoclean"
else
  sudo sh -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:

~/up

It also accepts one several package names as an arguments and that be called like this:

sudo ~/up package1,package2

This will then install „package1“ and „package2“.

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.

Ein Kommentar zu “Debian based full updates in one command

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert