# Creating a new package with the same environment as an existing package

**URL:** <https://discourse.julialang.org/t/creating-a-new-package-with-the-same-environment-as-an-existing-package/127684>\
**Category:** General Usage\
**Tags:** package\
**Created:** [April 3, 2025, 7:21pm UTC](https://discourse.julialang.org/t/creating-a-new-package-with-the-same-environment-as-an-existing-package/127684 "2025-04-03T19:21:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![curious](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/curious/32/7629_2.png) [@curious](https://discourse.julialang.org/u/curious)\
**Post date:** [April 3, 2025, 7:21pm UTC](https://discourse.julialang.org/t/creating-a-new-package-with-the-same-environment-as-an-existing-package/127684/1 "2025-04-03T19:21:38Z")

</div>

Hello,

I want to create a new package that has exactly the same environment as an existing package. I would appreciate some help with how to do this. I have read [Working with Julia projects | Julia programming notes](https://ufechner7.github.io/2022/08/16/julia-projects.html) and [jkrumbiegel.com – Pkg.jl and Julia Environments for Beginners](https://jkrumbiegel.com/pages/2022-08-26-pkg-introduction/). Thank you to both the authors. These helped a lot, but I have some follow up questions.

(1) The second link listed above explains how to reproduce an environment. However, it is not clear how to use it reproduce a package with a different name. A new package with different name already has a `Project.toml` with the new project name and UUID etc. Does one have to manually copy the `deps` from an existing project to this one before running `instantiate`?

(2) The first link shows how to get the compat lines in `Project.toml`. But it seems this has to be done manually for each dependency. Is that correct? Can one generate the compat section from the Manifest.toml automatically?

Thank you.
