linux-tools/modules/systemupdate/systemupdate.py

16 lines
499 B
Python

import subprocess
from AbstractModule import AbstractModule
class Systemupdate(AbstractModule):
def run(self):
print("Running update")
subprocess.call(["apt", "update", "-y"])
subprocess.call(["apt", "upgrade", "-y"])
subprocess.call(["apt", "dist-upgrade", "-y"])
subprocess.call(["apt", "autoremove", "-y"])
subprocess.call(["apt", "autoclean", "-y"])
print("All update processes finished, please check output for further details.")