diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index 6e43a298b4..612c4e45d5 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -116,10 +116,15 @@ if [ $EUID -eq 0 ]; then if [ -f ${easystack_file} ]; then echo_green "Software rebuild(s) requested in ${easystack_file}, so determining which existing installation have to be removed..." # we need to remove existing installation directories first, - # so let's figure out which modules have to be rebuilt by doing a dry-run and grepping "someapp/someversion" for the relevant lines (with [R]) + # so let's figure out which modules have to be rebuilt by doing a + # dry-run and grepping "someapp/someversion" for the relevant + # lines (with [R] or [F], the latter may be shown when the option + # --force is used) # * [R] $CFGS/s/someapp/someapp-someversion.eb (module: someapp/someversion) + # or + # * [F] $CFGS/s/someapp/someapp-someversion.eb (module: someapp/someversion) eb --allow-use-as-root-and-accept-consequences --dry-run-short --rebuild --easystack ${easystack_file} - rebuild_apps=$(eb --allow-use-as-root-and-accept-consequences --dry-run-short --rebuild --easystack ${easystack_file} | grep "^ \* \[R\]" | grep -o "module: .*[^)]" | awk '{print $2}') + rebuild_apps=$(eb --allow-use-as-root-and-accept-consequences --dry-run-short --rebuild --easystack ${easystack_file} | grep "^ \* \[[FR]\]" | grep -o "module: .*[^)]" | awk '{print $2}') for app in ${rebuild_apps}; do # Returns e.g. /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen2/modules/all: app_modulepath=$(module --terse av ${app} 2>&1 | head -n 1 | sed 's/://')