# Make Pkg.undo work accross sessions

**URL:** <https://discourse.julialang.org/t/make-pkg-undo-work-accross-sessions/43630>\
**Category:** Internals & Design\
**Created:** [July 24, 2020, 5:40pm UTC](https://discourse.julialang.org/t/make-pkg-undo-work-accross-sessions/43630 "2020-07-24T17:40:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NightMachinary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nightmachinary/32/14196_2.png) [@NightMachinary](https://discourse.julialang.org/u/NightMachinary)\
**Post date:** [July 24, 2020, 5:40pm UTC](https://discourse.julialang.org/t/make-pkg-undo-work-accross-sessions/43630/1 "2020-07-24T17:40:44Z")

</div>

I use this shell function to easily install Julia packages:

```julia
jins () {
    julia --startup-file=no -e 'using Pkg; Pkg.add("'"$1"'"); Pkg.precompile()'
}

```

So when something goes wrong, I can’t use `Pkg.undo()` and get:

```julia
ERROR: undo: no more states left

```

---

<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:** [July 24, 2020, 6:09pm UTC](https://discourse.julialang.org/t/make-pkg-undo-work-accross-sessions/43630/2 "2020-07-24T18:09:02Z")

</div>

Is this a feature request? It would be quite a substantial change. I would suggest using version control if you need longer term rollback of project and manifest files.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 25, 2020, 7:53am UTC](https://discourse.julialang.org/t/make-pkg-undo-work-accross-sessions/43630/3 "2020-07-25T07:53:15Z")

</div>

I agree that version control is the right place for this and `Pkg` should not duplicate that functionality, but maybe the docstring of `undo` could suggest this explicitly.
