Skip to content

Instantly share code, notes, and snippets.

@joseivanlopez
Created July 15, 2026 11:27
Show Gist options
  • Select an option

  • Save joseivanlopez/38d0b7881a01ab42ae5b8d20d735bb0a to your computer and use it in GitHub Desktop.

Select an option

Save joseivanlopez/38d0b7881a01ab42ae5b8d20d735bb0a to your computer and use it in GitHub Desktop.

Almost all modern operating system installers (Windows, macOS, and various Linux distributions) offer a way to cancel the installation process, but the availability and safety of doing so depend heavily on what stage of the installation you are in.

Operating system installers divide the process into a safe "Configuration Phase" and a critical "Writing Phase."


Phase 1: The Configuration Phase (100% Safe to Cancel)

Before any files are copied or disks are formatted, you go through setup screens (choosing a language, agreeing to a license agreement, selecting a keyboard layout, or choosing a Wi-Fi network).

  • How it looks: You will explicitly see a "Cancel", "Quit", or "X" (Close) button on the window.
  • What happens if you click it: The installer will cleanly exit. It will unmount any temporary files, reboot or shut down the computer, and leave your hard drive completely untouched.

Phase 2: The Writing Phase (High Risk / Hard to Cancel)

Once you click "Install" and the screen changes to a progress bar saying something like "Copying files...", "Formatting drive...", or "Applying update...", the installer enters a critical state.

At this point, the options change drastically across operating systems:

1. Windows Installer (Setup.exe)

  • The Option: Even during the file-copying phase, the classic Windows installer window still retains the close (X) button in the top right corner.
  • What happens if you click it: Windows will display a warning dialog box: "Are you sure you want to cancel Windows installation?" * The Result: If you click "Yes," the installer will attempt to clean up and halt. However, if it has already formatted your hard drive or overwritten your bootloader, your computer will be left in an unbootable state because the old OS is gone and the new OS is only half-installed.

2. macOS Installer

  • The Option: Once Apple's installer enters the actual file-writing stage (the dark screen with the Apple logo and a progress bar), the "Cancel" option is completely removed. The menu bar disappears, and keyboard shortcuts like Cmd + Q (Quit) are disabled.
  • The Result: The only way to stop it is to force-shut down the computer by holding down the physical Power Button. Doing this mid-install is highly risky; it often corrupts the target APFS volume or leaves the firmware/recovery environment in a broken state, requiring a full internet recovery restore.

3. Linux Installers (Ubuntu's Ubiquity, openSUSE's YaST, Fedora's Anaconda)

  • The Option: Most modern Linux installers include a visible "Quit" or "Cancel" button even during installation.
  • The Result: Clicking it will immediately kill the installer process and return you to the live desktop environment (running from your USB drive). However, just like Windows, if the installer had already reached the "Partitioning" or "Formatting" step, your local hard drive's data has already been wiped, and you will need to start an installation over to make the machine bootable again.

Summary Table

OS Installer Cancelable during setup screens? Cancelable during progress bar? Risk if aborted mid-progress
Windows Yes (Clean Exit) Yes (Close X Button) High (Broken/Unbootable OS)
macOS Yes (Quit Installer) No (Interface is locked) Extreme (Requires recovery restore)
Linux Yes (Clean Exit) Yes (Quit Button) High (Wiped disk/No OS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment