# Mapping for within Artifacts.toml already exists

**URL:** <https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831>\
**Category:** General Usage\
**Created:** [May 20, 2020, 1:52pm UTC](https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831 "2020-05-20T13:52:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [May 20, 2020, 1:52pm UTC](https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831/1 "2020-05-20T13:52:39Z")

</div>

I updated an artifact online and wanted therefore to remove the existing (old) artifact I had locally, so I went and found the folder that contained it (in `.julia/artifacts/hash/here`) and just deleted it. Now I get this error:

```julia
julia> using CoffeeBeetles
[Info: Precompiling CoffeeBeetles [9927b314-560b-4f5c-ae2a-379059c760a4]
ERROR: LoadError: LoadError: Mapping for 'data' within /home/yakir/.julia/packages/CoffeeBeetles/Oeh8N/src/../Artifacts.toml already exists!
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] bind_artifact!(::String, ::String, ::Base.SHA1; platform::Nothing, download_info::Nothing, lazy::Bool, force::Bool) at /home/yakir/julia/usr/share/julia/stdlib/v1.4/Pkg/src/Artifacts.jl:626
 [3] bind_artifact!(::String, ::String, ::Base.SHA1) at /home/yakir/julia/usr/share/julia/stdlib/v1.4/Pkg/src/Artifacts.jl:620
 [4] top-level scope at /home/yakir/.julia/packages/CoffeeBeetles/Oeh8N/src/generate_artifacts.jl:11
 [5] include(::Module, ::String) at ./Base.jl:377
 [6] include(::String) at /home/yakir/.julia/packages/CoffeeBeetles/Oeh8N/src/CoffeeBeetles.jl:1
 [7] top-level scope at /home/yakir/.julia/packages/CoffeeBeetles/Oeh8N/src/CoffeeBeetles.jl:13
 [8] include(::Module, ::String) at ./Base.jl:377
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:331 [inlined]
 [11] eval(::Expr) at ./client.jl:449
 [12] top-level scope at ./none:3
in expression starting at /home/yakir/.julia/packages/CoffeeBeetles/Oeh8N/src/generate_artifacts.jl:6
in expression starting at /home/yakir/.julia/packages/CoffeeBeetles/Oeh8N/src/CoffeeBeetles.jl:13
ERROR: Failed to precompile CoffeeBeetles [9927b314-560b-4f5c-ae2a-379059c760a4] to /home/yakir/.julia/compiled/v1.4/CoffeeBeetles/yhoPD_qsBdb.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922

```

How can I fix this?

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [May 20, 2020, 1:55pm UTC](https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831/2 "2020-05-20T13:55:05Z")

</div>

Not knowing how Julia tracks all the stuff in the `.julia` directory I would probably nuke the whole `.julia` directory and let it be rebuilt.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [May 20, 2020, 2:05pm UTC](https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831/3 "2020-05-20T14:05:02Z")

</div>

eh… no.

I hope not?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [May 20, 2020, 2:11pm UTC](https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831/4 "2020-05-20T14:11:51Z")

</div>

I can’t find this package anywhere (not registered, not known to Google), so it’s hard to diagnose this. It looks like `bind_artifact!` is complaining that there’s already an entry for the name you’re giving to that artifact. You have to use `unbind_artifact!()` to remove the existing binding or equivalently, manually delete the stanzas in the `Artifacts.toml` file that define that artifact binding.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [May 20, 2020, 2:15pm UTC](https://discourse.julialang.org/t/mapping-for-within-artifacts-toml-already-exists/39831/5 "2020-05-20T14:15:13Z")

</div>

Here’s the repo

> **[GitHub - yakir12/CoffeeBeetles.jl: Code base for "A dung beetle that homes...](https://github.com/yakir12/CoffeeBeetles.jl)**
>
> Code base for "A dung beetle that homes without the use of landmarks" - GitHub - yakir12/CoffeeBeetles.jl: Code base for "A dung beetle that homes without the use of landmarks"

Thanks for trying!

I’ll try what you suggested.
