diff --git a/installation/resource/installer/bin/upgrade.sh b/installation/resource/installer/bin/upgrade.sh
index 11a1aeadac99a6682507d9ea6a0fde9bca5bb3b3..a706004fa0011467cb6ac90bbc6be5cb00fe3c04 100755
--- a/installation/resource/installer/bin/upgrade.sh
+++ b/installation/resource/installer/bin/upgrade.sh
@@ -23,7 +23,8 @@ popd > /dev/null
 
 # set INSTALL_PATH in the console.properties
 sed_params='s#^INSTALL_PATH=.*$#INSTALL_PATH='$OPENBIS_INSTALL_DIR'#'
-sed -i '' "$sed_params" $INSTALLER_DIR/console.properties
+sed "$sed_params" $INSTALLER_DIR/console.properties > $INSTALLER_DIR/console.properties.modified
+mv $INSTALLER_DIR/console.properties.modified > $INSTALLER_DIR/console.properties 
 
 # run the installation
 $INSTALLER_DIR/run-console.sh
diff --git a/screening/dist/admin/upgrade.sh b/screening/dist/admin/upgrade.sh
index 14c2f6de13520d32124d86b8b3a4cc6929cb5d44..b091675d43ef178dd614128a4a79b753a545bdb2 100755
--- a/screening/dist/admin/upgrade.sh
+++ b/screening/dist/admin/upgrade.sh
@@ -62,7 +62,8 @@ popd > /dev/null
 
 # set INSTALL_PATH in the console.properties
 sed_params='s#^INSTALL_PATH=.*$#INSTALL_PATH='$OPENBIS_INSTALL_DIR'#'
-sed -i '' "$sed_params" $INSTALLER_DIR/console.properties
+sed "$sed_params" $INSTALLER_DIR/console.properties > $INSTALLER_DIR/console.properties.modified
+mv $INSTALLER_DIR/console.properties.modified > $INSTALLER_DIR/console.properties 
 
 # run the installation
 $INSTALLER_DIR/run-console.sh