Skip to content

Uninstallation

2 min read Updated SS RS

Note

Uninstalling HEAL will completely remove HEAL from the system. Ensure that you understand the consequences and have verified all necessary prerequisites before proceeding. Proceed with caution, as this action affect your existing configuration and data.

To uninstall HEAL, follow the steps below. Make sure to run the scripts as a root user.

1. Locate the uninstaller script in the installation directory.

2. Execute the following script to uninstall the software from all nodes. Provide the required details as indicated:

./appsoneUninstaller.sh <Installation Dir, <Remote IPs separated by space> <Installer_build_path> <nomad server port/optional>

For example:

a) Multi Node Setup:

./appsoneUninstaller.sh '/<Path to HEAL> '192.0.2.153 192.0.2.212' '/home/appnomic'
./appsoneUninstaller.sh '/<Path to HEAL> '192.0.2.153 192.0.2.212' '/home/appnomic' 4641

b) Single Node Setup:

./appsoneUninstaller.sh '' '/home/appnomic'
./appsoneUninstaller.sh '' '/home/appnomic'  4641

Deploy the safe_delete.sh Script#

To deploy the safe_delete.sh script, follow the below steps:

1. Copy the Script

Copy the safe_delete.sh script to the HEAL servers.

Run the following command to avoid unexpected line-ending issues:

dos2unix safe_delete.sh

2. Place the Script

Move the safe_delete.sh script to the HEAL user’s home directory.

3. Execution Prerequisite

Run the script only as a non-root user.

Provide one or more absolute file or directory paths as arguments while executing the script.

4. Dry-Run Mode (Optional): The script supports a dry-run mode to verify which files or directories will be deleted, without performing actual deletion.

For example:

./safe_delete.sh --dry-run /home/test_1/files_to_delete/file1.txt

Expected output:

=== DRY-RUN MODE ===
The following would be deleted (no actual deletion):
file : /home/test_1/files_to_delete/file1.txt
=== END DRY-RUN ===

5. Actual Script Execution

Note: All the below script will be successfully executed post the confirmation as y.

Proceed with deletion? (y/n): y

i. Delete a Single File: The script prompts for confirmation before deletion.

./safe_delete.sh /home/test_1/files_to_delete/file1.txt

ii. Delete Multiple Files: All specified files are listed and deleted after user confirmation.

./safe_delete.sh /home/test_1/files_to_delete/file1.txt /home/test_1/files_to_delete/file2.txt

iii. Delete Directory Contents: Deletes all contents of the directory while preserving the directory itself.

./safe_delete.sh /home/test_1/files_to_delete/

iv. Abort Deletion: If the user selects `n` or `no` at the confirmation prompt, the operation is aborted and no files are deleted.

Proceed with deletion? (y/n): n

6. Upon successful execution, the script displays deletion details followed by:

Operation complete

Note: Always review the listed files using dry-run mode before performing actual deletion to avoid unintended data loss.