From 259370ff9dcdc00410fda5a7e3248b4224cb5705 Mon Sep 17 00:00:00 2001 From: konsthol Date: Thu, 28 Sep 2023 07:26:38 +0300 Subject: [PATCH] should work now. --- harden | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/harden b/harden index 4341e70..122dde7 100755 --- a/harden +++ b/harden @@ -667,16 +667,13 @@ function update_system { export NEEDRESTART_MODE=a export DEBIAN_PRIORITY=critical # Running sudo with -E will preserve the environment variables set in the script - sudo -E apt update -y && sudo apt upgrade -y # Update the package list and upgrade the packages - sudo -E apt install -y + sudo -E apt update -y && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y # Update the package list, upgrade the packages, remove unnecessary packages and clean old package's cache ;; "dnf") # If the package manager is dnf sudo dnf upgrade -y # Update the package list - sudo dnf install -y ;; "zypper") # If the package manager is zypper sudo zypper update -y # Update the package list - sudo zypper install -y ;; *) # If the package manager is not one of the above, output unsupported package manager