---
title: Installing Packages
summary: Install packages from ForgeBox, Git, a URL or a folder, then list and remove them.
icon: phosphor-duotone:package
tags: [course]
---

In this lesson you will install packages with `install`, see where they land and how that is recorded in `box.json`, then list and remove them. Run these commands inside a folder that has a `box.json`.

## From ForgeBox

[ForgeBox](https://www.forgebox.io) is the default package registry. Give `install` a slug:

```bash
box install coldbox
```

Add `@version` to install a specific version:

```bash
box install coldbox@7.0.0
```

## From other sources

`install` also accepts a Git repository, a URL, a zip file or a local folder:

```bash
box install git://site.com/user/repo.git
box install git://site.com/user/repo.git#v2.1.0
box install http://site.com/package.zip
box install C:/myUnzippedPackages/package/
box install myuser/myproject
```

The last form is a shortcut for a GitHub user and repository.

## Saving dependencies

By default the package is saved to `dependencies` in `box.json`. Two flags change that:

```bash
box install cbdebugger --saveDev
box install feeds --!save
```

`--saveDev` records it under `devDependencies`, and `--!save` installs without recording anything. Running `install` with no slug installs everything already listed in `box.json`:

```bash
box install
```

## Where packages go

The package lands in a folder named after its slug. Override the location for one package with `installPaths` in `box.json`:

```bash
box package set installPaths.logbox=../logbox/
box package show installPaths
```

## List and uninstall

```bash
box list
box uninstall coldbox
```

## Recap

- `install` accepts a ForgeBox slug, Git URL, HTTP URL, zip or folder.
- Dependencies are saved by default, `--saveDev` and `--!save` change that.
- `installPaths` sets the folder, `list` shows what you have and `uninstall` removes it.
