# Pkg.upgrade() of JuMP/MathProgBase

**URL:** <https://discourse.julialang.org/t/pkg-upgrade-of-jump-mathprogbase/1044>\
**Category:** Optimization (Mathematical)\
**Created:** [December 19, 2016, 4:06pm UTC](https://discourse.julialang.org/t/pkg-upgrade-of-jump-mathprogbase/1044 "2016-12-19T16:06:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![monty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/monty/32/44234_2.png) [@monty](https://discourse.julialang.org/u/monty)\
**Post date:** [December 19, 2016, 4:06pm UTC](https://discourse.julialang.org/t/pkg-upgrade-of-jump-mathprogbase/1044/1 "2016-12-19T16:06:20Z")

</div>

I did `Pkg.checkout()` of JuMP/MathProgBase to get the latest versions. However, `Pkg.upgrade()` is downgrading JuMP/MathProgBase to old versions. I am using julia 0.5. How to resolve this?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [December 19, 2016, 7:23pm UTC](https://discourse.julialang.org/t/pkg-upgrade-of-jump-mathprogbase/1044/2 "2016-12-19T19:23:53Z")

</div>

Yes, there really is no good way to resolve this right now. It’s one reason why I shy away from maximum version requirements! To pin it down by hand, use `Pkg.dependents("JuMP")` and `Pkg.dependents("MathProgBase")` to get a listing of packages which are dependents, and then go through your library folder in alphabetical order looking at the `REQUIRE` file to see if any of the dependents have a maximum version requirement. Note that some of these packages may be dependencies of a different library, so you’ll likely have to check many more packages than you explicitly installed.

In the end, you will find one with the maximum version requirement and go open an issue, or remove that package. However, that package may be pulled in by a different package, in which case it will reinstall itself and so you need to check via `Pkg.dependents` what’s doing that (or this may show up in the `Pkg.update()` printout?)

Either way, resolving these kinds of dependencies issues is not fun.

---

<div class="post-metadata">

**Author:** ![monty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/monty/32/44234_2.png) [@monty](https://discourse.julialang.org/u/monty)\
**Post date:** [December 20, 2016, 10:21pm UTC](https://discourse.julialang.org/t/pkg-upgrade-of-jump-mathprogbase/1044/3 "2016-12-20T22:21:04Z")

</div>

Thank you very much for the response.

I think now everything os ok.

I wrote a code in [Mads.jl](https://github.com/madsjulia/Mads.jl) to find the version dependencies:

```julia
"Lists modules required by a module (Mads by default)"
function required(modulename::String="Mads", filtermodule::String="")
	filename = joinpath(Pkg.dir(modulename), "REQUIRE")
	if isfile(filename)
		modules = readdlm(filename)
		if filtermodule != ""
			i = modules[:,1].==filtermodule
		else
			i = modules[:,1].!="julia"
		end
		return modules[i,:];
	else
		return [filtermodule ""];
	end
end

"Lists modules dependents on a module (Mads by default)"
function dependents(modulename::String="Mads", filter::Bool=false)
	depmodules = Pkg.dependents(modulename)
	modules = Array(Any, (0, 2))
	for i in depmodules
		modules = [modules; [i Mads.required(i, modulename)[:,2]]]
	end
	if filter
		i = modules[:,2].!=""
		modules = modules[i,:]
	end
	return modules;
end

```
