diff --git a/scripts/update/alpine.sh b/scripts/update/alpine.sh index 02ff4a4..56dfb0d 100755 --- a/scripts/update/alpine.sh +++ b/scripts/update/alpine.sh @@ -29,10 +29,6 @@ printf ""$font_colored_bold">> system update started..."$font_default"\n" printf ""$font_colored"> updating packages..."$font_default"\n" [[ "$noconfirm" ]] && apk --update-cache upgrade --progress || apk --update-cache upgrade --progress --interactive -#printf ""$font_colored"> cleaning cache..."$font_default"\n" -#apk cache clean &> /dev/null -#rm -rf "/var/cache/apk/*" - orphans="$(apk list --orphaned | awk '{print $1}' 2> /dev/null)" if [[ "$orphans" ]]; then orphans="$(printf "$orphans" | tr '\n' ' ')" @@ -45,6 +41,10 @@ fi script="$(dirname $(realpath $0))/conf.d/$(hostname).sh" [[ -x "$script" ]] && printf ""$font_colored"> executing script "$script"..."$font_default"\n" && (. "$script") +printf ""$font_colored"> cleaning cache..."$font_default"\n" +apk cache clean &> /dev/null +rm -rf "/var/cache/apk/*" + printf ""$font_colored_bold">> system updated finished!"$font_default"\n" [[ ! "$reboot" ]] && exit 0