# Don't let Pkg downgrade packages automatically

**URL:** <https://discourse.julialang.org/t/dont-let-pkg-downgrade-packages-automatically/43424>\
**Category:** Internals & Design\
**Created:** [July 21, 2020, 10:10am UTC](https://discourse.julialang.org/t/dont-let-pkg-downgrade-packages-automatically/43424 "2020-07-21T10:10:46Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [July 21, 2020, 11:00am UTC](https://discourse.julialang.org/t/dont-let-pkg-downgrade-packages-automatically/43424/5 "2020-07-21T11:00:32Z")

</div>

> [@NightMachinary](#):
>
> But I don’t think it’s nice to downgrade my packages without a warning (and my explicit confirmation)

Not only downgrading; upgrading packages may also be very breaking. But since the dependency trees of packages often involve dozens of other packages, any update or new package will most likely change the versions of others. So, in my opinion warnings or confirmation prompts would not be very informative or useful, because you would see them _every time_ you update or add a package.

I’d rather say that you have to assume that `]add`, `]rm` and `]up` can always break your code. So it’s good practice to get accustomed to create a different environment for each new project. (And that also makes your code more stable and reproducible, as indicated in the documentation that I linked in the previous post.)

For trying packages, I have a “sandbox” evironment that does not interfere with “serious work”, and I wipe it out (just deleting the `Project.toml` and `Manifest.toml`) as soon as I have finished my testing.

> [@NightMachinary](#):
>
> so my problem was solved by uninstalling it and updating everything to their latest versions

You might also be interested in `]undo`, as mentioned here:

> [@Pin all packages of a project](https://discourse.julialang.org/t/pin-all-packages-of-a-project/39308/3):
>
> Note that you can always just undo (@v1.4) pkg\> up # oops ... Updating `~/.julia/environments/v1.4/Project.toml` [587475ba] ↑ Flux v0.10.4 #master (https://github.com/FluxML/Flux.jl.git) ⇒ v0.10.5 #master (https://github.com/FluxML/Flux.jl.git) [91a5bcdd] ↑ Plots v1.2.3 ⇒ v1.2.4 [295af30f] ↑ Revise v2.5.4 ⇒ v2.6.6 [e88e6eb3] ↑ Zygote v0.4.19 #master (https://github.com/FluxML/Zygote.jl.git) ⇒ v0.4.20 #master (https://github.com/FluxML/Zygote.jl.git) Updating `~/.julia/environment…

---

_[View the full topic](https://discourse.julialang.org/t/dont-let-pkg-downgrade-packages-automatically/43424)._
