grahampugh / erase-install

A script that automates downloading macOS installers, and optionally erasing or upgrading macOS in a single process. Watch the video!
https://grahamrpugh.com/2023/05/14/macaduk-presentation-eraseinstall.html
Apache License 2.0
836 stars 131 forks source link

Erase-Install folder not getting deleted after succesful upgarde #460

Closed Jaykrishnak closed 3 months ago

Jaykrishnak commented 10 months ago

Describe the bug Erase-Install folder not getting deleted after successful upgrade

To Reproduce -#!/bin/zsh

shellcheck shell=bash

: <<DOC erase-install run/postinstall script for downloading the latest available Install macOS Ventura.app and reinstalling the OS without wiping. by Graham Pugh Substitute parameters as required for other OSs and workflows. To see all possible parameters, run erase-install.sh --help DOC /Library/Management/erase-install/erase-install.sh --os 13 --update --reinstall --cleanup-after-use --check-power

Expected behavior Erase-install folder should remove from /Library/Management/ after successful upgrade

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Here is complete logs-

[STEP 1 of 5]

Executing Policy macOS Upgrade Enforce to Ventura 13.0 (erase--install) [STEP 2 of 5] Downloading erase-install-31.0.pkg... Downloading https://use1-jcds.services.jamfcloud.com//download/97af279bcf074720809eb2576a2bc9be/erase-install-31.0.pkg... Verifying package integrity... Installing erase-install-31.0.pkg... Successfully installed erase-install-31.0.pkg. [STEP 3 of 5] Running script Erase--Install (Ventura 13.0)... Script exit code: 0 Script result: 2023-10-25 17:33:37 | v31.0 | [erase-install] Making log directory at /Library/Management/erase-install/log2023-10-25 17:33:37 | v31.0 | [log_rotate] Finished rotating logs in /Library/Management/erase-install/log 2023-10-25 17:33:37 | v31.0 | [erase-install] v31.0 script execution started: Wed Oct 25 17:33:37 IST 2023 2023-10-25 17:33:37 | v31.0 | [erase-install] Arguments provided: --os 13 --update --reinstall --cleanup-after-use --check-power 2023-10-25 17:33:37 | v31.0 | [erase-install] System version: 12.6.8 (Build: 21G725) 2023-10-25 17:33:37 | v31.0 | [check_for_swiftdialog_app] swiftDialog v2.3.2.4726 is installed (/Library/Application Support/Dialog/Dialog.app) 2023-10-25 17:33:37 | v31.0 | [check_for_swiftdialog_app] Creating dialog log (/var/tmp/dialog.fKx)... 2023-10-25 17:33:37 | v31.0 | [erase-install] Caffeinating this script (pid=9235) 2023-10-25 17:33:38 | v31.0 | [check_free_space] OK - 467 GB free/purgeable disk space detected 2023-10-25 17:33:38 | v31.0 | [erase-install] Looking for existing installer app or pkg 2023-10-25 17:33:38 | v31.0 | [find_existing_installer] No valid installer found. 2023-10-25 17:33:38 | v31.0 | [erase-install] Existing installer OS version does not match requested OS (13). 2023-10-25 17:33:38 | v31.0 | [overwrite_existing_installer] Overwrite option selected. Deleting existing version. overwrite_existing_installer:6: no matches found: /Volumes/macOS 2023-10-25 17:33:38 | v31.0 | [erase-install] Running on architecture i386 2023-10-25 17:33:38 | v31.0 | [check_power_status] OK - AC power detected 2023-10-25 17:33:38 | v31.0 | [get_default_dialog_args] Invoking utility dialog 2023-10-25 17:33:38 | v31.0 | [check_for_mist] mist is installed (/usr/local/bin/mist) 2023-10-25 17:33:38 | v31.0 | [get_mist_list] Non-default catalog selected (darwin version 21) ┌──────────────────┐ │ INPUT VALIDATION │ └──────────────────┘ ├─ Search only for latest (first) result will be 'false'... ├─ Include betas in search results will be 'false'... ├─ Only include compatible installers will be 'true'... ├─ Export path will be '/Library/Management/erase-install/mist-list.json'... ├─ Export path file extension is valid... ├─ Output type will be 'ascii'... ┌────────┐ │ SEARCH │ └────────┘ ├─ Searching for macOS Installer versions... ├─ Exported list as JSON: '/Library/Management/erase-install/mist-list.json' └─ Found 17 macOS Installer(s) available for download [0;0m┌────────────┬────────────────┬─────────┬─────────┬──────────┬────────────┬────────────┐ │ IDENTIFIER │ NAME │ VERSION │ BUILD │ SIZE │ DATE │ COMPATIBLE │ ├────────────┼────────────────┼─────────┼─────────┼──────────┼────────────┼────────────┤ [0;0m[0;0m│ [0;0m042-58988 [0;0m │ [0;0mmacOS Sonoma [0;0m │ [0;0m14.0 [0;0m │ [0;0m23A344 [0;0m │ [0;0m12.87 GB[0;0m │ [0;0m2023-09-26[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-55926 [0;0m │ [0;0mmacOS Ventura [0;0m │ [0;0m13.6 [0;0m │ [0;0m22G120 [0;0m │ [0;0m11.95 GB[0;0m │ [0;0m2023-09-21[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-43677 [0;0m │ [0;0mmacOS Ventura [0;0m │ [0;0m13.5.2 [0;0m │ [0;0m22G91 [0;0m │ [0;0m11.95 GB[0;0m │ [0;0m2023-09-07[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-25643 [0;0m │ [0;0mmacOS Ventura [0;0m │ [0;0m13.5.1 [0;0m │ [0;0m22G90 [0;0m │ [0;0m11.95 GB[0;0m │ [0;0m2023-08-17[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m032-69593 [0;0m │ [0;0mmacOS Ventura [0;0m │ [0;0m13.5 [0;0m │ [0;0m22G74 [0;0m │ [0;0m11.95 GB[0;0m │ [0;0m2023-07-24[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-01917 [0;0m │ [0;0mmacOS Ventura [0;0m │ [0;0m13.4.1 [0;0m │ [0;0m22F82 [0;0m │ [0;0m11.80 GB[0;0m │ [0;0m2023-06-28[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-55586 [0;0m │ [0;0mmacOS Monterey[0;0m │ [0;0m12.7 [0;0m │ [0;0m21G816 [0;0m │ [0;0m12.40 GB[0;0m │ [0;0m2023-09-21[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-45268 [0;0m │ [0;0mmacOS Monterey[0;0m │ [0;0m12.6.9 [0;0m │ [0;0m21G726 [0;0m │ [0;0m12.41 GB[0;0m │ [0;0m2023-09-11[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-15015 [0;0m │ [0;0mmacOS Monterey[0;0m │ [0;0m12.6.8 [0;0m │ [0;0m21G725 [0;0m │ [0;0m12.42 GB[0;0m │ [0;0m2023-07-24[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m032-97690 [0;0m │ [0;0mmacOS Monterey[0;0m │ [0;0m12.6.7 [0;0m │ [0;0m21G651 [0;0m │ [0;0m12.41 GB[0;0m │ [0;0m2023-06-28[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-45246 [0;0m │ [0;0mmacOS Big Sur [0;0m │ [0;0m11.7.10[0;0m │ [0;0m20G1427[0;0m │ [0;0m12.42 GB[0;0m │ [0;0m2023-09-11[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m042-14707 [0;0m │ [0;0mmacOS Big Sur [0;0m │ [0;0m11.7.9 [0;0m │ [0;0m20G1426[0;0m │ [0;0m12.42 GB[0;0m │ [0;0m2023-07-24[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m032-96684 [0;0m │ [0;0mmacOS Big Sur [0;0m │ [0;0m11.7.8 [0;0m │ [0;0m20G1351[0;0m │ [0;0m12.42 GB[0;0m │ [0;0m2023-06-28[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m001-68446 [0;0m │ [0;0mmacOS Catalina[0;0m │ [0;0m10.15.7[0;0m │ [0;0m19H15 [0;0m │ [0;0m08.75 GB[0;0m │ [0;0m2020-11-11[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m001-51042 [0;0m │ [0;0mmacOS Catalina[0;0m │ [0;0m10.15.7[0;0m │ [0;0m19H2 [0;0m │ [0;0m08.75 GB[0;0m │ [0;0m2020-09-24[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m001-36801 [0;0m │ [0;0mmacOS Catalina[0;0m │ [0;0m10.15.6[0;0m │ [0;0m19G2021[0;0m │ [0;0m08.75 GB[0;0m │ [0;0m2020-08-13[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m│ [0;0m001-04366 [0;0m │ [0;0mmacOS Catalina[0;0m │ [0;0m10.15.4[0;0m │ [0;0m19E2269[0;0m │ [0;0m08.75 GB[0;0m │ [0;0m2020-05-04[0;0m │ [0;0mTrue [0;0m │ [0;0m[0;0m└────────────┴────────────────┴─────────┴─────────┴──────────┴────────────┴────────────┘ [0;0m 2023-10-25 17:33:52 | v31.0 | [run_mist] Restricting to selected OS '13' 2023-10-25 17:33:52 | v31.0 | [run_mist] Setting mist to only list compatible installers 2023-10-25 17:33:52 | v31.0 | [get_mist_list] Non-default catalog selected (darwin version 21) 2023-10-25 17:33:52 | v31.0 | [run_mist] This command is now being run: 2023-10-25 17:33:52 | v31.0 | mist download installer Ventura application --application-name Install %NAME%.app --output-directory /Applications --compatible --no-ansi --catalog-url https://swscan.apple.com/content/catalogs/others/index-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog ┌──────────────────┐ │ INPUT VALIDATION │ └──────────────────┘ ├─ User is 'root'... ├─ Download search string will be 'Ventura'... ├─ Include betas in search results will be 'false'... ├─ Only include compatible installers will be 'true'... ├─ Cache downloads will be 'false'... ├─ Output directory will be '/Applications'... ├─ Temporary directory will be '/private/tmp/com.ninxsoft.mist'... ├─ Force flag has not been set, existing files will not be overwritten... ├─ Application name will be 'Install %NAME%.app'... ┌────────┐ │ SEARCH │ └────────┘ ├─ Searching for macOS download 'Ventura'... ├─ Found [042-55926] macOS Ventura 13.6 (22G120) [2023-09-21] ┌───────┐ │ SETUP │ └───────┘ ├─ Creating new temporary directory '/private/tmp/com.ninxsoft.mist/042-55926'... ┌──────────┐ │ DOWNLOAD │ └──────────┘ ├─ [ 1 / 7 ] 042-55926.English.dist.......... [ 0000 B / 0000 B (00.00%) ] ├─ [ 1 / 7 ] 042-55926.English.dist.......... [ 07.58 KB / 07.58 KB (100.0%) ] ├─ [ 1 / 7 ] 042-55926.English.dist.......... [ 07.58 KB / 07.58 KB (100.0%) ] │ Verifying... │ Verifying... [0;32m✓✓✓[0;0m ├─ [ 2 / 7 ] BuildManifest.plist............. [ 0000 B / 07.41 MB (00.00%) ] ├─ [ 2 / 7 ] BuildManifest.plist............. [ 07.41 MB / 07.41 MB (100.0%) ] │ Verifying... │ Verifying... [0;32m✓✓✓[0;0m ├─ [ 3 / 7 ] Info.plist...................... [ 0000 B / 05.36 KB (00.00%) ] ├─ [ 3 / 7 ] Info.plist...................... [ 05.36 KB / 05.36 KB (100.0%) ] ├─ [ 3 / 7 ] Info.plist...................... [ 05.36 KB / 05.36 KB (100.0%) ] │ Verifying... │ Verifying... [0;32m✓✓✓[0;0m ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 0000 B / 11.94 GB (00.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg........... [ 119.62 MB / 11.94 GB (01.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg........... [ 238.78 MB / 11.94 GB (02.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg........... [ 358.18 MB / 11.94 GB (03.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg........... [ 477.67 MB / 11.94 GB (04.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg........... [ 596.95 MB / 11.94 GB (05.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg........... [ 716.30 MB / 11.94 GB (06.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg........... [ 835.79 MB / 11.94 GB (07.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg........... [ 955.14 MB / 11.94 GB (08.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.07 GB / 11.94 GB (09.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.19 GB / 11.94 GB (10.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.31 GB / 11.94 GB (11.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.43 GB / 11.94 GB (12.00%) ] ├─ The network connection was lost. ├─ Retrying attempt [ 1 / 10 ] in 30 seconds... ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.49 GB / 11.94 GB (12.46%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.55 GB / 11.94 GB (13.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.67 GB / 11.94 GB (14.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.79 GB / 11.94 GB (15.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 01.91 GB / 11.94 GB (16.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.03 GB / 11.94 GB (17.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.15 GB / 11.94 GB (18.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.27 GB / 11.94 GB (19.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.39 GB / 11.94 GB (20.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.51 GB / 11.94 GB (21.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.63 GB / 11.94 GB (22.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.75 GB / 11.94 GB (23.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.87 GB / 11.94 GB (24.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 02.98 GB / 11.94 GB (25.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 03.10 GB / 11.94 GB (26.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 03.22 GB / 11.94 GB (27.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 03.34 GB / 11.94 GB (28.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 03.46 GB / 11.94 GB (29.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 03.58 GB / 11.94 GB (30.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 03.70 GB / 11.94 GB (31.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 03.82 GB / 11.94 GB (32.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 03.94 GB / 11.94 GB (33.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 04.06 GB / 11.94 GB (34.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 04.18 GB / 11.94 GB (35.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 04.30 GB / 11.94 GB (36.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 04.42 GB / 11.94 GB (37.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 04.54 GB / 11.94 GB (38.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 04.66 GB / 11.94 GB (39.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 04.77 GB / 11.94 GB (40.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 04.89 GB / 11.94 GB (41.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.01 GB / 11.94 GB (42.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.13 GB / 11.94 GB (43.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.25 GB / 11.94 GB (44.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.37 GB / 11.94 GB (45.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.49 GB / 11.94 GB (46.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.61 GB / 11.94 GB (47.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.73 GB / 11.94 GB (48.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.85 GB / 11.94 GB (49.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 05.97 GB / 11.94 GB (50.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 06.09 GB / 11.94 GB (51.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 06.21 GB / 11.94 GB (52.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 06.33 GB / 11.94 GB (53.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 06.45 GB / 11.94 GB (54.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 06.57 GB / 11.94 GB (55.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 06.68 GB / 11.94 GB (56.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 06.80 GB / 11.94 GB (57.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 06.92 GB / 11.94 GB (58.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 07.04 GB / 11.94 GB (59.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 07.16 GB / 11.94 GB (60.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 07.28 GB / 11.94 GB (61.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 07.40 GB / 11.94 GB (62.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 07.52 GB / 11.94 GB (63.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 07.64 GB / 11.94 GB (64.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 07.76 GB / 11.94 GB (65.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 07.88 GB / 11.94 GB (66.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.00 GB / 11.94 GB (67.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.12 GB / 11.94 GB (68.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.24 GB / 11.94 GB (69.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.36 GB / 11.94 GB (70.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.48 GB / 11.94 GB (71.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.59 GB / 11.94 GB (72.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.71 GB / 11.94 GB (73.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.83 GB / 11.94 GB (74.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 08.95 GB / 11.94 GB (75.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 09.07 GB / 11.94 GB (76.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 09.19 GB / 11.94 GB (77.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 09.31 GB / 11.94 GB (78.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 09.43 GB / 11.94 GB (79.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 09.55 GB / 11.94 GB (80.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 09.67 GB / 11.94 GB (81.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 09.79 GB / 11.94 GB (82.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 09.91 GB / 11.94 GB (83.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.03 GB / 11.94 GB (84.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.15 GB / 11.94 GB (85.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.27 GB / 11.94 GB (86.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.39 GB / 11.94 GB (87.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.50 GB / 11.94 GB (88.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.62 GB / 11.94 GB (89.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.74 GB / 11.94 GB (90.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.86 GB / 11.94 GB (91.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.98 GB / 11.94 GB (92.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 11.10 GB / 11.94 GB (93.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 11.22 GB / 11.94 GB (94.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 11.34 GB / 11.94 GB (95.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 11.46 GB / 11.94 GB (96.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 11.58 GB / 11.94 GB (97.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 11.70 GB / 11.94 GB (98.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 11.82 GB / 11.94 GB (99.00%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 11.94 GB / 11.94 GB (100.0%) ] ├─ [ 4 / 7 ] InstallAssistant.pkg............ [ 10.45 GB / 10.45 GB (100.0%) ] │ Verifying... │ Verifying... [0;32m✓✓✓[0;0m ├─ [ 5 / 7 ] InstallInfo.plist............... [ 0000 B / 0181 B (00.00%) ] ├─ [ 5 / 7 ] InstallInfo.plist............... [ 0181 B / 0181 B (100.0%) ] ├─ [ 5 / 7 ] InstallInfo.plist............... [ 0181 B / 0181 B (100.0%) ] │ Verifying... │ Verifying... [0;32m✓✓✓[0;0m ├─ [ 6 / 7 ] MajorOSInfo.pkg................. [ 0000 B / 01.33 MB (00.00%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................. [ 29.77 KB / 01.33 MB (02.23%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................. [ 46.16 KB / 01.33 MB (03.46%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................. [ 62.55 KB / 01.33 MB (04.69%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................ [ 465.67 KB / 01.33 MB (34.89%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................ [ 727.82 KB / 01.33 MB (54.53%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................ [ 989.96 KB / 01.33 MB (74.17%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................. [ 01.25 MB / 01.33 MB (93.81%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................. [ 01.33 MB / 01.33 MB (100.0%) ] ├─ [ 6 / 7 ] MajorOSInfo.pkg................. [ 01.33 MB / 01.33 MB (100.0%) ] │ Verifying... │ Verifying... [0;32m✓✓✓[0;0m ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 0000 B / 03.50 MB (00.00%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 49.15 KB / 03.50 MB (01.40%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................ [ 312.61 KB / 03.50 MB (08.92%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................ [ 659.21 KB / 03.50 MB (18.81%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................ [ 923.89 KB / 03.50 MB (26.36%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 01.19 MB / 03.50 MB (33.91%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 01.47 MB / 03.50 MB (41.93%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 01.73 MB / 03.50 MB (49.48%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 02.00 MB / 03.50 MB (57.03%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 02.28 MB / 03.50 MB (64.98%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 02.54 MB / 03.50 MB (72.49%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 02.82 MB / 03.50 MB (80.51%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 03.10 MB / 03.50 MB (88.53%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 03.37 MB / 03.50 MB (96.08%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 03.50 MB / 03.50 MB (100.0%) ] ├─ [ 7 / 7 ] UpdateBrain.zip................. [ 03.50 MB / 03.50 MB (100.0%) ] │ Verifying... │ Verifying... [0;32m✓✓✓[0;0m ┌─────────┐ │ INSTALL │ └─────────┘ ├─ Creating image '/private/tmp/com.ninxsoft.mist/042-55926/042-55926.dmg'... ├─ Mounting disk image at mount point '/Volumes/042-55926'... ├─ Creating new installer '/Volumes/042-55926/Applications/Install macOS Ventura.app'... ├─ Created new installer '/Volumes/042-55926/Applications/Install macOS Ventura.app' ┌─────────────┐ │ APPLICATION │ └─────────────┘ ├─ Copying '/Volumes/042-55926/Applications/Install macOS Ventura.app' to '/Applications/Install macOS Ventura.app'... ┌──────────┐ │ TEARDOWN │ └──────────┘ ├─ Unmounting disk image at mount point '/Volumes/042-55926'... └─ Deleting temporary directory '/private/tmp/com.ninxsoft.mist/042-55926'... 2023-10-25 17:54:21 | v31.0 | [run_mist] Install macOS Ventura.app downloaded to /Applications. 2023-10-25 17:54:21 | v31.0 | [erase-install] Installer is at: /Applications/Install macOS Ventura.app 2023-10-25 17:54:22 | v31.0 | [check_free_space] OK - 446 GB free/purgeable disk space detected 2023-10-25 17:54:22 | v31.0 | [erase-install] WARNING! Running /Applications/Install macOS Ventura.app with reinstall option 2023-10-25 17:54:22 | v31.0 | [erase-install] Sending quit message to dialog log (/var/tmp/dialog.fKx) PNG image data, 1024 x 1024, 8-bit/color RGBA, non-interlaced 2023-10-25 17:54:23 | v31.0 | [get_default_dialog_args] Invoking fullscreen dialog 2023-10-25 17:54:23 | v31.0 | [erase-install] Writing LaunchDaemon which will remove /Library/Management/erase-install at next boot File Doesn't Exist, Will Create: /Library/LaunchDaemons/com.github.grahampugh.erase-install.remove.plist 2023-10-25 17:54:24 | v31.0 | [launch_startosinstall] This is the startosinstall command that will be used: 2023-10-25 17:54:24 | v31.0 | [launch_startosinstall] /Applications/Install\ macOS\ Ventura.app/Contents/Resources/startosinstall --pidtosignal 9235 --agreetolicense --nointeraction --allowremoval --forcequitapps 2023-10-25 17:54:24 | v31.0 | [launch_startosinstall] Launching startosinstall... File Doesn't Exist, Will Create: /Library/LaunchDaemons/com.github.grahampugh.erase-install.startosinstall.plist By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms. If you do not agree, press CTRL-C and cancel this process immediately. Preparing to run macOS Installer... Preparing: 0.0% Preparing: 0.1% Preparing: 0.2% Preparing: 2.3% Preparing: 2.4% Preparing: 2.5% Preparing: 2.6% Preparing: 2.7% Preparing: 2.8% Preparing: 2.9% Preparing: 3.0% Preparing: 3.1% Preparing: 3.2% Preparing: 3.3% Preparing: 3.4% Preparing: 3.5% Preparing: 3.6% Preparing: 3.7% Preparing: 3.8% Preparing: 3.9% Preparing: 4.0% Preparing: 4.1% Preparing: 4.2% Preparing: 4.3% Preparing: 4.4% Preparing: 4.5% Preparing: 4.6% Preparing: 4.7% Preparing: 4.8% Preparing: 4.9% Preparing: 5.0% Preparing: 5.1% Preparing: 5.2% Preparing: 5.3% Preparing: 5.4% Preparing: 5.5% Preparing: 5.6% Preparing: 5.7% Preparing: 5.8% Preparing: 5.9% Preparing: 6.0% Preparing: 6.1% Preparing: 6.2% Preparing: 6.3% Preparing: 6.4% Preparing: 6.5% Preparing: 6.6% Preparing: 6.7% Preparing: 6.8% Preparing: 6.9% Preparing: 7.0% Preparing: 7.1% Preparing: 7.2% Preparing: 7.3% Preparing: 7.4% Preparing: 7.5% Preparing: 7.6% Preparing: 7.7% Preparing: 7.8% Preparing: 7.9% Preparing: 8.0% Preparing: 8.1% Preparing: 8.2% Preparing: 8.3% Preparing: 8.4% Preparing: 8.5% Preparing: 8.6% Preparing: 8.7% Preparing: 34.8% Preparing: 35.4% Preparing: 40.1% Preparing: 40.2% Preparing: 44.8% Preparing: 44.9% Preparing: 49.6% Preparing: 54.4% Preparing: 54.8% Preparing: 87.3% Preparing: 88.3% Preparing: 89.5% Preparing: 90.1% Preparing: 90.9% Preparing: 91.6% Preparing: 93.0% Preparing: 93.6% Preparing: 94.4% Preparing: 95.0% Preparing: 95.7% Preparing: 96.3% Preparing: 96.8% Preparing: 97.8% Preparing: 98.4% Preparing: 99.2% Preparing: 100.0% Preparing: 100.8% Preparing: 101.0% Preparing: 101.2% Preparing: 102.3% Preparing: 102.4% 2023-10-25 18:16:12 | v31.0 | [post_prep_work] Reboot delay set to 0s 2023-10-25 18:16:12 | v31.0 | [erase-install] attempting to terminate the 'Self Service' process - Termination message indicates success 2023-10-25 18:16:12 | v31.0 | [erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success 2023-10-25 18:16:12 | v31.0 | [finish] Script exit code: 0 [STEP 4 of 5] [STEP 5 of 5]

grahampugh commented 10 months ago

The LaunchDaemon that is supposed to delete the folder is created as expected:

2023-10-25 17:54:23 \| v31.0 \| [erase-install] Writing LaunchDaemon which will remove /Library/Management/erase-install at next boot

For troubleshooting you would need to look on the machine and see if the launchdaemon is still in place, which would indicate that it did not run for some reason.

Could it be that you have some security software that might be blocking unknown launchdaemons?

Jaykrishnak commented 10 months ago

launchdaemon is not there on path

grahampugh commented 10 months ago

That means it successfully ran and deleted itself.

I suspect you have something preventing the folder from being deleted on that device. Can you reproduce it on more than one computer, including a computer that does not have your standard configuration and software installed on it?

grahampugh commented 3 months ago

Closing through lack of response.