Monday, July 24, 2023

Chocolatey Package Manager


Chocolatey is a package manager for Windows that allows you to install software packages from the command line. It is similar to apt-get on Linux


### Installation of Chocolatey package CLI 

```sh 
Set-ExecutionPolicy Bypass -Scope Process -Force; 

[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; 

iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

```

### Install software package using Chocolatey CLI.

We can install software packages in Windows using choco CLI 

 Syntax 
```sh 
choco install 
```

 Examples 
```sh 
choco install keeweb 		                    <# install keeweb package using choco CLI #>

choco install visualstudio2019-workload-python 	<# install VS 2019 template to python development#>
```

### List out installed chocolatey packages in the windows system.

 Syntax 
```sh 
choco list  
```

### Uninstall software package using Chocolatey CLI.

We can install software packages in Windows using choco CLI 

 Syntax 
```sh 
choco uninstall 
```

 Examples 
```sh 
choco uninstall keeweb 		                       <# uninstall keeweb package using choco CLI #>

choco uninstall visualstudio2019-workload-python 	<# uninstall VS 2019 template to python development#>
```

### Upgrade software package using Chocolatey CLI.

We can upgrade software packages in Windows using choco CLI 

 Syntax 
```sh 
choco upgrade 
```

 Examples 
```sh 
choco upgrade keeweb 		                       <# upgrade keeweb package using choco CLI #>

choco upgrade visualstudio2019-workload-python 	   <# upgrade VS 2019 template to python development#>

choco upgrade chocolatey                           <# upgrade chocolatey package #> 

choco upgrade notepadplusplus googlechrome atom 7zip    <# upgrade notepadplusplus,googlechrome ,atom,7zip packages #> 

choco upgrade all --except="skype,conemu"               <# will upgrade all packages except for Skype and ConEmu #> 
```


No comments:

Post a Comment