# Why do the packages folders get dirty/broken so easily?

**URL:** <https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375>\
**Category:** General Usage\
**Created:** [December 6, 2018, 1:13pm UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375 "2018-12-06T13:13:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [December 6, 2018, 1:13pm UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375/1 "2018-12-06T13:13:59Z")

</div>

Many times I install new packages I end up needing to delete the clones folder or cleaning the git repository in some way.  
Is there any way to avoid this problems?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [December 6, 2018, 1:50pm UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375/2 "2018-12-06T13:50:20Z")

</div>

> [@Juan](#):
>
> needing to

What happens otherwise?

When you just install packages normally we don’t use clones, so not sure what your problem comes from. In what way are the clones dirty?

---

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [December 6, 2018, 7:29pm UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375/3 "2018-12-06T19:29:26Z")

</div>

Today I haven’t installed anything new but when I’ve installed new packages (for example last week StatsMakie.jl) I had this kind of errors :

> [@Registry dirty](https://discourse.julialang.org/t/registry-dirty/17989):
>
> Apparently my registry is dirty; how should I clean it? Julia-1.0.2\> Pkg.update() Updating registry at `C:\Users\plowman\.julia\registries\General` ┌ Warning: Some registries failed to update: │ — `C:\Users\plowman\.julia\registries\General` — registry dirty └ @ Pkg.API C:\cygwin\home\Administrator\buildbot\worker\package\_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:157 Resolving package versions... Updating `C:\Users\plowman\.julia\environments\v1.0\Project.toml` [no change…

I’ve seen you are the guy who replied there suggesting to remove `~/.julia/registires/General`. Other threads suggest to remove the Clones folder instead.

If I don’t do it I just can’t install or build the package.

More about dirty folders:

> <https://github.com/JuliaPlots/Plots.jl/issues/55>
>
> This is really bad. With an unstaged "change", you can't use any Pkg commands o…n the package because git thinks it is dirty. I didn't "do" anything except using Plots, immerse(), plot(1:4). I did the same thing with pyplot().
> 
> This is very painful for users to fix, requiring much mucking about with git. Standard things like git checkout -- . do NOT work to fix this. I ended up rm'ing the file and rebasing the repository, then Pkg.rm'ing it to get rid of it and then reinstalling.
> 
> And even removing things leaves lots of detritus just in case you want to reinstall-so you never really get it clean unless you delete from the file system. and then you've got out of sync caches.
> 
> Here is the outcome:
> 
> shell\> cd ..
> /Users/lewislevinmbr/.julia/v0.4/Plots
> shell\> git status
> HEAD detached at 894928d
> Changes not staged for commit:
> (use "git add \<file\>..." to update what will be committed)
> (use "git checkout -- \<file\>..." to discard changes in working directory)
> 
> \`\`\`
> modified: img/qwt/qwt\_example\_2.gif
> \`\`\`
> 
> no changes added to commit (use "git add" and/or "git commit -a")

Is there any way to remove just the broken subfolder (know which one) instead of all the registry or clones folder?

---

<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:** [December 6, 2018, 7:34pm UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375/4 "2018-12-06T19:34:06Z")

</div>

> [@Juan](#):
>
> Today I haven’t installed anything new but when I’ve installed new packages (for example last week StatsMakie.jl) I had this kind of errors :

That was an intermittent error and was not a package that got dirty, but the registry.

---

<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:** [December 6, 2018, 9:14pm UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375/5 "2018-12-06T21:14:49Z")

</div>

The issue you linked to is three years old… it’s not even remotely relevant.

---

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [December 6, 2018, 11:33pm UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375/6 "2018-12-06T23:33:31Z")

</div>

That was the first I found.  
But I had the same kind of error messages last week with Julia 1.0.

---

<div class="post-metadata">

**Author:** ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)\
**Post date:** [December 6, 2018, 11:40pm UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375/7 "2018-12-06T23:40:21Z")

</div>

There are many reasons why these folders can break. The issue where the registry broke last week (this is probably the issue you are referring to) was a _temporary_ issue in the registry which has now been fixed: it will not continue to happen.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [December 7, 2018, 7:13am UTC](https://discourse.julialang.org/t/why-do-the-packages-folders-get-dirty-broken-so-easily/18375/8 "2018-12-07T07:13:35Z")

</div>

> [@Juan](#):
>
> If I don’t do it I just can’t install or build the package.

What is the error message? Can you show some error messages with stacktrace?
