Installation

Uninstall cnspec

Remove cnspec from a device

We hate to see you go, but if you need to part ways with cnspec, this guide walks you through completely removing it from a machine.

If cnspec is running as a service, stop and disable it before uninstalling. Uninstalling requires administrator or sudo privileges.

Log out and uninstall

  1. Log out the cnspec client:

    cnspec logout --force
  2. Uninstall the package:

    sudo apt remove mondoo
    sudo apt autoremove
  3. Remove the repository and signing key:

    sudo rm /usr/share/keyrings/mondoo-archive-keyring.gpg
    sudo rm /etc/apt/sources.list.d/mondoo.list
  1. Log out the cnspec client:

    cnspec logout --force
  2. Uninstall the package:

    sudo dnf remove mondoo
  3. Remove the repository:

    sudo rm /etc/yum.repos.d/mondoo.repo
  1. Log out the cnspec client:

    cnspec logout --force
  2. Remove the MondooUpdater scheduled task:

    Unregister the scheduled task and remove its folder
    Unregister-ScheduledTask -TaskName MondooUpdater -Confirm:$false
    $scheduleObject = New-Object -ComObject Schedule.Service
    $scheduleObject.connect()
    $rootFolder = $scheduleObject.GetFolder("\")
    $rootFolder.DeleteFolder("Mondoo", $null)
  3. Uninstall the Mondoo MSI package and remove its directories:

    Uninstall and clean up
    $app = Get-WmiObject -Class Win32_Product -Filter "Name = 'Mondoo'"
    $app.Uninstall()
    Remove-Item 'C:\Program Files\Mondoo\' -Recurse -Force
    Remove-Item 'C:\ProgramData\Mondoo\' -Recurse -Force
  1. Log out the cnspec client:

    cnspec logout --force
  2. Uninstall using Homebrew:

    Remove the mondoo package and tap
    brew uninstall mondoo
    brew untap mondoohq/mondoo
  3. If present, remove configuration files:

    sudo rm -rf /etc/opt/mondoo/

On this page