diff --git a/docker/scripts/cleanup_apt.sh b/docker/scripts/cleanup_apt.sh index 883df9ba8a..0b0d43fea1 100755 --- a/docker/scripts/cleanup_apt.sh +++ b/docker/scripts/cleanup_apt.sh @@ -1,11 +1,11 @@ #!/bin/bash -function cleanup() { - local remove_var_lib_apt_lists=false +function cleanup_apt() { + local remove_var_lib_apt_lists=$1 apt-get autoremove -y && rm -rf "$HOME"/.cache - if "$remove_var_lib_apt_lists"; then + if [[ $remove_var_lib_apt_lists == true ]]; then rm -rf /var/lib/apt/lists/* fi } -cleanup "$@" +cleanup_apt "$@"