# Is Pkg.clone replaced by Pkg.add in v1.0.3?

**URL:** https://discourse.julialang.org/t/is-pkg-clone-replaced-by-pkg-add-in-v1-0-3/19879
**Category:** New to Julia
**Tags:** pkg
**Created:** [January 21, 2019, 3:26pm UTC](https://discourse.julialang.org/t/is-pkg-clone-replaced-by-pkg-add-in-v1-0-3/19879 "2019-01-21T15:26:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://discourse.julialang.org/u/simon)
#### Post date: [January 21, 2019, 3:26pm UTC](https://discourse.julialang.org/t/is-pkg-clone-replaced-by-pkg-add-in-v1-0-3/19879/1 "2019-01-21T15:26:23Z")

</div>

I’m trying to add some unregistered packages from online, and I have some legacy installation code that uses Pkg.clone instead of Pkg.add.  
Is clone here replaced by add in 1.0?

Not sure if I’m right. It seems like Pkg.add = REPL add = a new version of clone which add package to Project.toml?  
Reading this: [[Julia 1.0 Replacement for `Pkg.clone(url::String, name::String)` and adding in Project.toml](https://discourse.julialang.org/t/julia-1-0-replacement-for-pkg-clone-url-string-name-string-and-adding-in-project-toml/18140)]

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [January 21, 2019, 3:33pm UTC](https://discourse.julialang.org/t/is-pkg-clone-replaced-by-pkg-add-in-v1-0-3/19879/2 "2019-01-21T15:33:17Z")

</div>

Yes, see documentation on `Pkg.add` (especially the examples)

```julia
help?> Pkg.add
  Pkg.add(pkg::Union{String, Vector{String}})
  Pkg.add(pkg::Union{PackageSpec, Vector{PackageSpec}})

  Add a package to the current project. This package will be available using the import and using keywords in the Julia REPL and if the current project is a package, also inside that package.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  Pkg.add("Example") # Add a package from registry
  Pkg.add(PackageSpec(name="Example", version="0.3")) # Specify version
  Pkg.add(PackageSpec(url="https://github.com/JuliaLang/Example.jl", rev="master")) # From url
  Pkg.add(PackageSpec(url="/remote/mycompany/juliapackages/OurPackage"))` # From path (has to be a gitrepo)

  See also PackageSpec.

```

or the Pkg-REPL mode add

```julia
(v1.0) pkg> ?add
  add pkg[=uuid] [@version] [#rev] ...

  Add package pkg to the current project file. If pkg could refer to multiple different packages, specifying uuid allows you to disambiguate. @version optionally allows specifying which versions of packages. Versions
  may be specified by @1, @1.2, @1.2.3, allowing any version with a prefix that matches, or ranges thereof, such as @1.2-3.4.5. A git-revision can be specified by #branch or #commit.

  If a local path is used as an argument to add, the path needs to be a git repository. The project will then track that git repository just like if it is was tracking a remote repository online.

  Examples

  pkg> add Example
  pkg> add Example@0.5
  pkg> add Example#master
  pkg> add Example#c37b675
  pkg> add https://github.com/JuliaLang/Example.jl#master
  pkg> add git@github.com:JuliaLang/Example.jl.git
  pkg> add Example=7876af07-990d-54b4-ab0e-23690620f79a

```
