---
name: "dub-add-local"
section: "1"
platform: "linux"
package: "dub"
version: "1.42.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dub-add-local"
---

# dub-add-local(1)

Adds a local package directory (e.g. a git repository)

## NAME

dub-add-local - Adds a local package directory (e.g. a git repository)

## SYNOPSIS

**dub add-local** \<*path*\> \[\<*version*\>\] *OPTIONS...*

## DESCRIPTION

Adds a local package directory to be used during dependency resolution. This command is useful for registering local packages, such as GIT working copies, that are either not available in the package registry, or are supposed to be overwritten.

The version of the package is either determined automatically (see the "add-path" command, or can be explicitly overwritten by passing a version on the command line.

See 'dub add-path -h' for a way to register multiple local packages at once.

## OPTIONS

- **--system**

  DEPRECATED: Use --cache=system instead

### COMMON OPTIONS

See [**dub**(1)](/dub/1.md)

## EXIT STATUS

- **0**

  DUB succeeded

- **1**

  usage errors, unknown command line flags

- **2**

  package not found, package failed to load, miscellaneous error

## FILES

*dub.sdl*, *dub.json*

## AUTHOR

Copyright (c) 1999-2026 by The D Language Foundation

## ONLINE DOCUMENTATION

http://code.dlang.org/docs/commandline

## SEE ALSO

[**dub**(1)](/dub/1.md), [**dub-remove-local**(1)](/dub-remove-local/1.md)
