# PkgTemplates. Errors after creating and deleting the package

**URL:** <https://discourse.julialang.org/t/pkgtemplates-errors-after-creating-and-deleting-the-package/74943>\
**Category:** General Usage\
**Tags:** package, pkgtemplates\
**Created:** [January 20, 2022, 3:58pm UTC](https://discourse.julialang.org/t/pkgtemplates-errors-after-creating-and-deleting-the-package/74943 "2022-01-20T15:58:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjgorski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pjgorski/32/4802_2.png) [@pjgorski](https://discourse.julialang.org/u/pjgorski)\
**Post date:** [January 20, 2022, 3:58pm UTC](https://discourse.julialang.org/t/pkgtemplates-errors-after-creating-and-deleting-the-package/74943/1 "2022-01-20T15:58:46Z")

</div>

I have done the following things:

1. I created a test package using PkgTemplates, then
2. I deleted it, and then
3. I wanted to create another test package and I ran into an error.  
`ERROR: expected package `Test [caf985be]`to exist at path`/path-to-package/Test`

I also get the same error, when writing `] update` or `] resolve`. I tried different `pkg` commands.  
I tried to remove folder `General` from .julia/registries.

This is the template I was using:

```julia
Template(; 
    user="pjgorski",
    dir="~/Test",
    authors="pjgorski",
    julia=v"1.6",
    plugins=[
        License(; name="MPL"),
        Git(; manifest=true, ssh=true),
        GitHubActions(; x86=true),
        Codecov(),
        Documenter{GitHubActions}(),
        Develop(),
    ],
)

```

Thanks for help!

---

<div class="post-metadata">

**Author:** ![rikh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rikh/32/204104_2.png) [@rikh](https://discourse.julialang.org/u/rikh)\
**Post date:** [January 20, 2022, 5:52pm UTC](https://discourse.julialang.org/t/pkgtemplates-errors-after-creating-and-deleting-the-package/74943/2 "2022-01-20T17:52:35Z")

</div>

It sounds like you installed your test package in the global Julia environment and because you deleted it, now it cannot be found.

To fix it, delete the test package from the global environment again `] rm MyPackage`

In general, it is advised to install as few things as possible in the global environment. To test out packages, use `] activate —temp` or activate a specific package inside a folder with `] activate .`
