# Why isn't pkg\> activate creating a new environment?

**URL:** https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944
**Category:** New to Julia
**Created:** [August 24, 2021, 8:12pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944 "2021-08-24T20:12:32Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![cybervigilante](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cybervigilante/32/26687_2.png) [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)
#### Post date: [August 24, 2021, 8:12pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944/1 "2021-08-24T20:12:32Z")

</div>

I’m using  
[https://pkgdocs.julialang.org/v1/environments/](https://pkgdocs.julialang.org/v1/environments/)  
to make a new project directory, clean of all my added packages.  
I do:

````julia
cd("MyNewProj")
pkg> activate```

Thinking I'd have a clean environment, but pkg> st shows All my old packages. What's not working?
````

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [August 24, 2021, 8:17pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944/2 "2021-08-24T20:17:37Z")

</div>

`] activate` without any argument goes to the default environment. You want `] activate .` which says “activate in this directory”

---

<div class="post-metadata">

### Author: ![cybervigilante](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cybervigilante/32/26687_2.png) [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)
#### Post date: [August 24, 2021, 8:34pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944/3 "2021-08-24T20:34:25Z")

</div>

Thanks. So much for the docs 😀

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [August 24, 2021, 8:40pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944/4 "2021-08-24T20:40:46Z")

</div>

Why do you sound like docs doesn’t mention this:

[https://docs.julialang.org/en/v1/stdlib/Pkg/](https://docs.julialang.org/en/v1/stdlib/Pkg/)

> When you are done experimenting with `tutorial` , you can return to the **default environment** by running `activate` with no arguments:

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [August 24, 2021, 8:52pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944/5 "2021-08-24T20:52:01Z")

</div>

Also [here](https://pkgdocs.julialang.org/v1.2/repl/#Other-commands-1).

It’s also available at the REPL

```julia
(@v1.6) pkg> ? activate
  activate
  activate [--shared|--temp] [path]

  Activate the environment at the given path, or the home project environment
  if no path is specified. The active environment is the environment that is
  modified by executing package commands. When the option --shared is given,
  path will be assumed to be a directory name and searched for in the
  environments folders of the depots in the depot stack. In case no such
  environment exists in any of the depots, it will be placed in the first
  depot of the stack. Use the temp option to create temporary environments.
  This should be useful for experimenting with packages.

```

---

<div class="post-metadata">

### Author: ![cybervigilante](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cybervigilante/32/26687_2.png) [@cybervigilante](https://discourse.julialang.org/u/cybervigilante)
#### Post date: [August 24, 2021, 9:00pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944/6 "2021-08-24T21:00:49Z")

</div>

Well, I ctrl-f searched that page for “activate” and didn’t see the following dot. I guess it’s just assumed you’ll know to do that. But thanks for the default environment tip.

---

<div class="post-metadata">

### Author: ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)
#### Post date: [August 24, 2021, 9:04pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944/7 "2021-08-24T21:04:03Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/3/9/394a92672dc9294ca25a1a9999a326efa592ba32.png)

The first example in that page has a dot, no?.

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [August 24, 2021, 9:47pm UTC](https://discourse.julialang.org/t/why-isnt-pkg-activate-creating-a-new-environment/66944/8 "2021-08-24T21:47:49Z")

</div>

If you are using Windows, you may like [Jeeves](https://discourse.julialang.org/t/how-to-properly-create-activate-and-resume-an-environment-in-vscode/48289/7), a nice utility to create new Julia projects, VSCode ready.
