2019-12-19 17:02:19 +00:00
---
title: Install and Uninstall
---
# Install and Uninstall
2019-11-20 20:12:09 +00:00
2019-11-20 21:08:11 +00:00
Users can choose between operating systems of MacOS, Windows, and Linux for Chef InSpec.
2019-11-20 20:12:09 +00:00
## Install Chef InSpec
2019-12-19 17:02:19 +00:00
You can download the latest Chef InSpec package relevant to your operating system at [our Downloads Page ](https://downloads.chef.io/inspec ).
2019-11-20 21:08:11 +00:00
2019-12-19 17:02:19 +00:00
Alternatively, Chef InSpec can be installed via installer, script, or package manager, according to your operating system and method as listed below.
2019-11-20 20:12:09 +00:00
### macOS
#### Homebrew
Chef InSpec is available as a standalone [Homebrew ](https://brew.sh/ ) package. Run the following command in your terminal to install Chef InSpec:
```
$ brew cask install chef/chef/inspec
```
While this command is running, you may be prompted to enter your macOS user account password for installation to complete.
2019-11-20 21:08:11 +00:00
#### CLI
2019-11-20 20:12:09 +00:00
2019-12-19 17:02:19 +00:00
You can download Chef InSpec via curl script:
2019-11-20 21:08:11 +00:00
```
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
```
2019-11-20 20:12:09 +00:00
### Windows
#### Installer
2019-12-19 17:02:19 +00:00
Once you downloaded the latest [Chef InSpec package ](https://downloads.chef.io/inspec ) relevant to your Microsoft version, double-click the `.msi` file to launch the installer and follow the prompts.
2019-11-20 20:12:09 +00:00
#### Powershell
2019-12-19 17:02:19 +00:00
Use the following command to install Chef InSpec via Powershell script:
2019-11-20 20:12:09 +00:00
```powershell
. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project inspec
```
Once Chef InSpec is installed, run `inspec version` to verify that the installation was successful.
### Linux
#### CLI
2019-12-19 17:02:19 +00:00
The following curl script will install Chef InSpec for Ubuntu and Red Hat Enterprise Linux:
```
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
```
If you prefer, you can use a package manager to install Chef InSpec.
Once you downloaded the latest [Chef InSpec package ](https://downloads.chef.io/inspec ) relevant to your Linux-based platform, use the command for the respective package manager listed below.
Replace the example file path with the file path leading to your downloaded package.
2019-11-20 20:12:09 +00:00
For Ubuntu, use the following command to install Chef InSpec:
```
sudo dpkg -i /path/to/inspec.deb
```
For Red Hat Enterprise Linux, use the following command to install Chef InSpec:
```
sudo rpm -U /path-to/inspec.rpm
```
For SUSE Linux Enterprise Server, use the following command to install Chef InSpec:
```
2020-01-14 21:33:43 +00:00
sudo zypper install /path-to/inspec.rpm
2019-11-20 20:12:09 +00:00
```
## Uninstall Chef InSpec
Chef InSpec can be uninstalled using the steps below that are appropriate for the method of Chef InSpec installation.
### macOS
#### Homebrew
Use the following *destructive* command to remove the Chef InSpec standalone Homebrew package:
```
2019-12-19 17:02:19 +00:00
$ brew cask uninstall inspec
2019-11-20 20:12:09 +00:00
```
#### CLI
2019-12-12 20:10:28 +00:00
Use the following *destructive* command in your terminal to remove the Chef InSpec package:
2019-11-20 20:12:09 +00:00
```
$ sudo rm -rf /opt/inspec
```
### Windows
#### Installer
2019-11-20 21:08:11 +00:00
Use *Add / Remove Programs* to remove Chef InSpec.
2019-11-20 20:12:09 +00:00
### Linux
2019-12-19 17:02:19 +00:00
#### CLI
The supported Linux-based platforms and their respective *destructive* command for their package manager are listed below.
2019-11-20 20:12:09 +00:00
2019-12-19 17:02:19 +00:00
For Ubuntu, use the following *destructive* command to uninstall:
2019-11-20 20:12:09 +00:00
```
sudo dpkg -P inspec
```
2019-12-19 17:02:19 +00:00
For Red Hat Enterprise Linux, use the following *destructive* command to uninstall:
2019-11-20 20:12:09 +00:00
```
sudo rpm -e inspec
```
2019-12-19 17:02:19 +00:00
For SUSE Linux Enterprise Server, use the following *destructive* command to uninstall Chef InSpec:
2019-11-20 20:12:09 +00:00
```
2020-01-14 21:33:43 +00:00
sudo zypper remove inspec
2019-11-20 20:12:09 +00:00
```