# How to delete all packages at once?

**URL:** <https://discourse.julialang.org/t/how-to-delete-all-packages-at-once/50393>\
**Category:** General Usage\
**Created:** [November 18, 2020, 6:41pm UTC](https://discourse.julialang.org/t/how-to-delete-all-packages-at-once/50393 "2020-11-18T18:41:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Berky](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_berky/32/19540_2.png) [@Tomas\_Berky](https://discourse.julialang.org/u/Tomas_Berky)\
**Post date:** [November 18, 2020, 6:41pm UTC](https://discourse.julialang.org/t/how-to-delete-all-packages-at-once/50393/1 "2020-11-18T18:41:20Z")

</div>

Hello guys, i want to delete all packages added. Can it be done by one command? Also i want to ask if it can be done with some lines in script(i am using atom to study julia)?

---

<div class="post-metadata">

**Author:** ![MatFi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/matfi/32/10002_2.png) [@MatFi](https://discourse.julialang.org/u/MatFi)\
**Post date:** [November 18, 2020, 10:46pm UTC](https://discourse.julialang.org/t/how-to-delete-all-packages-at-once/50393/2 "2020-11-18T22:46:13Z")

</div>

Hi and welcome,  
You could delete the packages folder: `rm("~/.julia/packages/*",recursive=true)` (linux)  
**BUT** this is in the very most cases not necessary/a bad idea, since you work in an “environment” that depends on the presence of some of these packages. The thing is, that you can just create a new environment using its own packages. So what ever you want to archive, deleting just the packages wont help you.  
**PLEASE do your self a favor and read [Working with Environments](https://julialang.github.io/Pkg.jl/v1.5/environments/) first.**

In case you just want to have a clean default environment simply delete the Proect.toml and the Manifest.toml files:

```julia
rm("~/.julia/environments/v1.5/Manifest.toml",recursive=true)
rm("~/.julia/environments/v1.5/Project.toml",recursive=true)

```

(replace the “v1.5” with your julia version)

---

<div class="post-metadata">

**Author:** ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Post date:** [November 19, 2022, 8:20am UTC](https://discourse.julialang.org/t/how-to-delete-all-packages-at-once/50393/3 "2022-11-19T08:20:21Z")

</div>

> [@MatFi](#):
>
> ```julia
> rm("~/.julia/environments/v1.5/Manifest.toml",recursive=true)
> rm("~/.julia/environments/v1.5/Project.toml",recursive=true)
> 
> ```

on MS-Windows, you have to modify the command, e.g. similar to this  
(only these two files must be deleted):

```julia
julia> rm(joinpath(homedir(), ".julia/environments/v1.x/Manifest.toml"))
julia> rm(joinpath(homedir(), ".julia/environments/v1.x/Project.toml"))

```

---

<div class="post-metadata">

**Author:** ![MatFi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/matfi/32/10002_2.png) [@MatFi](https://discourse.julialang.org/u/MatFi)\
**Post date:** [November 19, 2022, 5:09pm UTC](https://discourse.julialang.org/t/how-to-delete-all-packages-at-once/50393/4 "2022-11-19T17:09:38Z")

</div>

actually “recursive= ture” is not needed when deleting single files ^^
