diff --git a/scripts/bash_lib.sh b/scripts/bash_lib.sh index 9fde7d2a..7950bb88 100644 --- a/scripts/bash_lib.sh +++ b/scripts/bash_lib.sh @@ -167,8 +167,12 @@ rpm_pkg_makecache() { # Try several times, to avoid sporadic "The requested URL returned error: 404" made_cache=0 for i in {1..5}; do - sudo rm -rf "/var/cache/$pkg_cmd/*" - sudo "$pkg_cmd" clean all + if [[ $ID_LIKE =~ ^suse* ]]; then + sudo rm -rf "/var/cache/zypp/*" + sudo "$pkg_cmd" clean --all + else + sudo rm -rf "/var/cache/$pkg_cmd/*" + sudo "$pkg_cmd" clean all source /etc/os-release if [[ $ID == "rhel" ]]; then sudo subscription-manager refresh