# How do I stop pkg\> up from breaking my ControlSystems environment?

**URL:** <https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [September 10, 2025, 1:53pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252 "2025-09-10T13:53:35Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eventine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eventine/32/215272_2.png) [@Eventine](https://discourse.julialang.org/u/Eventine)\
**Post date:** [September 10, 2025, 1:53pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/1 "2025-09-10T13:53:35Z")

</div>

Hi, I’m quite new to Julia.

I’m using `ControlSystems` a lot but I have several issues with it.

In particular, when I’m doing `] up` (I’m generally doing it for other reasons not related to `ControlSystems`), `ControlSystems` and its dependencies update as well and it is always breaking my Julia environment. It has already happened 2 different times this last month.

Please tell me what I’m doing wrong and how should I fix my workflow. It takes me hours upon hours to fix these issues, which I think can be easily avoided through compatibility and versioning.

thanks

---

<div class="post-metadata">

**Author:** ![aryavorskiy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aryavorskiy/32/43466_2.png) [@aryavorskiy](https://discourse.julialang.org/u/aryavorskiy)\
**Post date:** [September 10, 2025, 2:03pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/2 "2025-09-10T14:03:54Z")

</div>

Hi!

Unfortunately, you didn’t elaborate what exactly breaks in your environment, so I can’t help you with that. But you always can pin the version of `ControlSystems` by running `] pin ControlSystems@x.y.z` to prevent updating this package (where `x.y.z` is the version that works for you)

---

<div class="post-metadata">

**Author:** ![Eventine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eventine/32/215272_2.png) [@Eventine](https://discourse.julialang.org/u/Eventine)\
**Post date:** [September 10, 2025, 2:28pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/3 "2025-09-10T14:28:34Z")

</div>

Sorry. so the `up` gave me this (related to ControlSystems dependencies)

```julia-auto
  [2b5f629d] ↑ DiffEqBase v6.183.2 ⇒ v6.189.1
⌃ [f6369f11] ↓ ForwardDiff v1.1.0 ⇒ v0.10.38
  [7ed4a6bd] ↑ LinearSolve v3.28.0 ⇒ v3.40.0
  [1dea7af3] ↑ OrdinaryDiffEq v6.101.0 ⇒ v6.102.1
  [bbf590c4] ↑ OrdinaryDiffEqCore v1.30.0 ⇒ v1.34.0
  [4302a76b] ↑ OrdinaryDiffEqDifferentiation v1.14.0 ⇒ v1.16.0
  [becaefa8] ↑ OrdinaryDiffEqExtrapolation v1.8.0 ⇒ v1.9.0
  [b0944070] ↑ OrdinaryDiffEqLowStorageRK v1.6.0 ⇒ v1.7.0
  [43230ef6] ↑ OrdinaryDiffEqRosenbrock v1.16.1 ⇒ v1.17.0
  [669c94d9] ↑ OrdinaryDiffEqSSPRK v1.6.0 ⇒ v1.7.0

```

and the error that resulted is this:

```julia-auto
WARNING: could not import OrdinaryDiffEq.DiffEqBase into ControlSystems
ERROR: LoadError: UndefVarError: `DiffEqBase` not defined in `ControlSystems`
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/ControlSystems/KuzoR/src/simulators.jl:49
 [2] include(mod::Module, _path::String)
   @ Base ./Base.jl:557
 [3] include(x::String)
   @ ControlSystems ~/.julia/packages/ControlSystems/KuzoR/src/ControlSystems.jl:1
 [4] top-level scope
   @ ~/.julia/packages/ControlSystems/KuzoR/src/ControlSystems.jl:22
 [5] include
   @ ./Base.jl:557 [inlined]
 [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
   @ Base ./loading.jl:2881

```

As far as I understand, it is a problem related to ControlSystems dependencies, thus won’t help fixing ControlSystems version, I should fix the version of all its dependencies.

Deleting the manifest and doing `resolve` was not helping either. The only way I found out to unlock my environemnt was to go into the Manifest and change back all the package versions.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 10, 2025, 2:35pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/4 "2025-09-10T14:35:17Z")

</div>

Manually editing the manifest isn’t a good idea - better to just do `]undo` if something went wrong with `]up`

---

<div class="post-metadata">

**Author:** ![sgaure](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sgaure/32/14779_2.png) [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Post date:** [September 10, 2025, 2:35pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/5 "2025-09-10T14:35:39Z")

</div>

There’s an issue at ControlSystems github about this: [ControlSystems.jl fails to compile · Issue #1020 · JuliaControl/ControlSystems.jl · GitHub](https://github.com/JuliaControl/ControlSystems.jl/issues/1020)

Apparently it has been fixed in a recent version.

---

<div class="post-metadata">

**Author:** ![Eventine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eventine/32/215272_2.png) [@Eventine](https://discourse.julialang.org/u/Eventine)\
**Post date:** [September 10, 2025, 2:38pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/6 "2025-09-10T14:38:24Z")

</div>

Thanks, I didn’t know about the undo!

---

<div class="post-metadata">

**Author:** ![Eventine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eventine/32/215272_2.png) [@Eventine](https://discourse.julialang.org/u/Eventine)\
**Post date:** [September 10, 2025, 2:44pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/7 "2025-09-10T14:44:00Z")

</div>

Wasn’t working for me, and it broke on the `] up`, so unless the fix was done on the next version (i.e. 1.17.x instead of 1.16.y), I don’t know why it didn’t update.

Do you know an alternative to ControlSystems?

---

<div class="post-metadata">

**Author:** ![sgaure](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sgaure/32/14779_2.png) [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Post date:** [September 10, 2025, 2:51pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/8 "2025-09-10T14:51:05Z")

</div>

I’ve never used ControlSystems.jl, and know of no alternative. I suggest you file an issue at their github at [GitHub · Where software is built](https://github.com/JuliaControl/ControlSystems.jl/issues)

@baggepinnen

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [September 10, 2025, 2:56pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/9 "2025-09-10T14:56:39Z")

</div>

Well, you should always use a local project like explained here: [Working with Julia projects | Julia programming notes](https://ufechner7.github.io/2022/08/16/julia-projects.html)

If you have a local Project.toml file, add a compat section (also explained in the link above) and enter in this `[compat]` section the version numbers of the packages you need in the combination that works well, like this:

```julia-auto
[compat]
ControlSystemsBase = "~1.15.1"

```

You can use `~` or `=` in front of the version number. `~` allows minor updates.

If you have a Project.toml file with a correct compat section you can always use `Pkg.update()` to update the indirect dependencies and nothing should break.

Furthermore, if you have a well tested state of your project, make a backup copy of your Manifest.toml file, like this:

```julia-auto
cp Manifest.toml Manifest-v1.11.toml.default

```

and add this copy to git.

Furthermore, often ControlSystemsBase.jl is good enough (and much faster to install) then ControlSystems.jl .

If you did these steps and still have problems, please post the output of

```julia-auto
using Pkg
Pkg.status()

```

You asked for alternatives to ControlSystems.jl . Well, we cannot answer this question if we do not know which problem you are trying to solve. If you tell us more, we might be able to suggest alternatives.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 10, 2025, 3:21pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/10 "2025-09-10T15:21:47Z")

</div>

> [@Eventine](#):
>
> Wasn’t working for me, and it broke on the `] up`, so unless the fix was done on the next version (i.e. 1.17.x instead of 1.16.y), I don’t know why it didn’t update.

The current release is 1.15.1 and includes the fix to the issue mentioned above. I have no problems using it on the latest Julia release:

```julia-auto
(@v1.11) pkg> activate --temp

(jl_AYjc7p) pkg> add ControlSystems
   Updating `...\AppData\Local\Temp\jl_AYjc7p\Project.toml`
  [a6e380b2] + ControlSystems v1.15.1
(...)

Precompiling project...
  155 dependencies successfully precompiled in 145 seconds. 95 already precompiled.
  1 dependency had output during precompilation:
┌ LinearSolve
│ Downloading artifact: MKL
└

(jl_AYjc7p) pkg> st
Status `...\AppData\Local\Temp\jl_AYjc7p\Project.toml`
  [a6e380b2] ControlSystems v1.15.1

julia> using ControlSystems

```

So if something isn’t working for you you’ll have to show the outputs of `versioninfo()` and `]st` for others to try and reproduce your issue.

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [September 10, 2025, 7:13pm UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/11 "2025-09-10T19:13:11Z")

</div>

One option you can consider:

1. Check your `Project.toml` and `Manifest.toml` files into source control. Also record what Julia version you are using (newer Julia versions store that info in the manifest for you).
2. Just before you do `pkg> up`, commit your current project and manifest files. At this point, you can also push to a remote (e.g. a private GitHub repo) if you want.
3. Do the `pkg> up`, and then see if anything breaks.
4. If something has broken, just revert to the previous commit, because you know that commit has a working manifest.

I’d probably recommend using Git as your source control system. But this approach should in theory work with any source control system.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [September 11, 2025, 9:52am UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/12 "2025-09-11T09:52:19Z")

</div>

To save some clicks, the reason is that `ControlSystems` formerly did `import OrdinaryDiffEq: DiffEqBase`, but [an update](https://github.com/SciML/OrdinaryDiffEq.jl/commit/4e5c3e4994e24f8b765fb958a694eee02814bbfc) to `OrdinaryDiffEq` switched from importing `DiffEqBase` (directly at least) to the [lightweight](https://github.com/SciML/SciMLBase.jl/pull/1) `SciMLBase`. The other modules and types a package imports and extends are internal details subject to change unless documented to be stable user-level features, and as far as I can tell, the heavy re-exporting makes it so that users of `OrdinaryDiffEq` aren’t intended to directly reference `DiffEqBase`. `ControlSystems` is free to separately use `DiffEqBase` as an internal dependency, which is the fix, though it could potentially switch to `SciMLBase` in the future.

Bit of an aside, importing a likely internal dependency of a direct dependency is currently the typical practice in extensions that can’t safely import dependencies other than its trigger packages. Besides being unfeasible for wholly independent internal types (I might want to crunch `StaticArrays` in an extension for packages that don’t use it), a direct dependency changing or omitting an internal import can break that extension forever.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [September 11, 2025, 11:52am UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/13 "2025-09-11T11:52:34Z")

</div>

pkg\> ?add

It’s good to use pkg\> `add --preserve=all` or some of the other options there. Or for

> up --preserve=\<all/direct/none\>

I wish this was the default in Julia, at least an option to never downgrade… which is likely your problem.

Save your` Manifest.toml` file, then you at least know how your exact working setup was like, and you can easily revert.

I add packages to my (global) environment like crazy (or have to test out intriguing packages), and I’m sure it doesn’t help. I’m adopting a better workflow since it’s a bad habit.

Sometimes downgrades are a problem, not sure about this one, any downgrade seems like a step backwards to me, so I want to eliminate the possibility (but then maybe you can’t install until you figure out what’s blocking and fixing that):

```julia-auto
⌃ [f6369f11] ↓ ForwardDiff v1.1.0 ⇒ v0.10.38

```

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 11, 2025, 11:55am UTC](https://discourse.julialang.org/t/how-do-i-stop-pkg-up-from-breaking-my-controlsystems-environment/132252/14 "2025-09-11T11:55:35Z")

</div>

> [@Palli](#):
>
> (or have to test out intriguing packages)

`]activate --temp` is your friend
