# Remove a package from dependencies

**URL:** https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056
**Category:** General Usage
**Created:** [July 14, 2020, 3:29pm UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056 "2020-07-14T15:29:25Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![marouane1994](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@marouane1994](https://discourse.julialang.org/u/marouane1994)
#### Post date: [July 14, 2020, 3:29pm UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056/1 "2020-07-14T15:29:25Z")

</div>

I made a package that has `Mamba` in its dependencies and now i want to delete it, because whenever i use this package it shows me warnings about `Mamba` but the thing is that i don’t really know how can i remove Mamba from the dependencies of my package

---

<div class="post-metadata">

### Author: ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)
#### Post date: [July 14, 2020, 3:30pm UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056/2 "2020-07-14T15:30:44Z")

</div>

Activate your package and use the `rm` command in Pkg `]` mode to remove the dependency.

---

<div class="post-metadata">

### Author: ![marouane1994](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@marouane1994](https://discourse.julialang.org/u/marouane1994)
#### Post date: [July 14, 2020, 3:32pm UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056/3 "2020-07-14T15:32:07Z")

</div>

i didn’t understand when you said activate my package!!

---

<div class="post-metadata">

### Author: ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)
#### Post date: [July 14, 2020, 3:41pm UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056/4 "2020-07-14T15:41:24Z")

</div>

First, you should remove the `using Mamba` from your code files. When someone loads your package, they will not load `Mamba` from their environment if they do not come across the `using Mamba` statement.

Second, your package may come with its own `Project.toml/Manifest.toml` flies that define an environment. So the structure of your package should look like

```julia
.
..
MyPackage.jl
Project.toml
Manifest.toml

```

where the `Project.toml` file has an entry defining your mamba dependency. So `cd` into your folder, launch Julia, and type in `] activate .` meaning activate the environment defined by the Project/Manifest files in the current folder. You should see the prompt change from `(@v1.4) pkg>` to `(MyPackage) pkg>`. Once your environment is activated, type in `rm Mamba` to remove the package.

The whole environments concept is very confusing and I still have a hard time figuring it out.

---

<div class="post-metadata">

### Author: ![marouane1994](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@marouane1994](https://discourse.julialang.org/u/marouane1994)
#### Post date: [July 14, 2020, 3:49pm UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056/5 "2020-07-14T15:49:06Z")

</div>

if i’m putting the package in Github couldn’t i just remove `using Mamba` from the code and remove the entry defining the mamba dependenciy and update the package directly? i guess it should work too.

---

<div class="post-metadata">

### Author: ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)
#### Post date: [July 14, 2020, 3:51pm UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056/6 "2020-07-14T15:51:13Z")

</div>

Yeah, you could manually remove the dependency from `Project.toml` file, after all it’s a simple text file. But I don’t think thats a good idea. The `Manifest.toml` file includes entries that `Mamba` depends on too, so its better to let the package manager do its thing to get clean files without dangling dependencies.

---

<div class="post-metadata">

### Author: ![marouane1994](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@marouane1994](https://discourse.julialang.org/u/marouane1994)
#### Post date: [July 14, 2020, 4:27pm UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056/7 "2020-07-14T16:27:11Z")

</div>

Yes, you are right but in case f i’m using another machine where i don’t have the code but i can only find it in Github, the way i said in the previous comment it is the only way i guess. Because this package that i made after all it is a standard registered package that you can find in Github anyways.

---

<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: [July 15, 2020, 11:03am UTC](https://discourse.julialang.org/t/remove-a-package-from-dependencies/43056/8 "2020-07-15T11:03:26Z")

</div>

If the package is on GitHub you can `dev` it from there, then do your changes to the environment using Pkg, and push those changes back up to GitHub. Manually tinkering with the Manifest.toml is not recommended as per the [Pkg docs](https://julialang.github.io/Pkg.jl/v1/toml-files/#Manifest.toml-1).
