Uninstall cnspec
Remove cnspec from a device
If you need to remove cnspec from a host, this page walks through it cleanly: log out of Mondoo Platform, uninstall the package, and clean up the leftover repository or scheduled task.
If cnspec is running as a service, stop and disable it first. Uninstalling requires administrator or sudo privileges.
Log out and uninstall
-
Log out the cnspec client:
cnspec logout --force -
Uninstall the package:
sudo apt remove mondoo sudo apt autoremove -
Remove the repository and signing key:
sudo rm /usr/share/keyrings/mondoo-archive-keyring.gpg sudo rm /etc/apt/sources.list.d/mondoo.list
-
Log out the cnspec client:
cnspec logout --force -
Uninstall the package:
sudo dnf remove mondoo -
Remove the repository:
sudo rm /etc/yum.repos.d/mondoo.repo
-
Log out the cnspec client:
cnspec logout --force -
Uninstall the package:
sudo zypper remove mondoo -
Remove the repository:
sudo rm /etc/zypp/repos.d/mondoo.repo
-
Log out the cnspec client:
cnspec logout --force -
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) -
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
-
Log out the cnspec client:
cnspec logout --force -
Uninstall using Homebrew:
Remove the mondoo package and tap brew uninstall mondoo brew untap mondoohq/mondoo -
If present, remove configuration files:
sudo rm -rf /etc/opt/mondoo/