Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --all option to rm, pin, free #2432

Merged
merged 2 commits into from
Mar 18, 2021

Conversation

IanButterworth
Copy link
Sponsor Member

Adding pkg> rm --all was discussed on slack, then this discourse post for the same with pkg> free --all

So here's all three

(jl_y3T9Rt) pkg> pin --all
   Resolving package versions...
    Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_y3T9Rt/Project.toml`
  [336ed68f]  CSV v0.8.4  v0.8.4 ⚲
  [682c06a0]  JSON v0.21.1  v0.21.1 ⚲
    Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_y3T9Rt/Manifest.toml`
  [336ed68f]  CSV v0.8.4  v0.8.4 ⚲
  [682c06a0]  JSON v0.21.1  v0.21.1 ⚲

(jl_y3T9Rt) pkg> free --all
    Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_y3T9Rt/Project.toml`
  [336ed68f]  CSV v0.8.4 v0.8.4
  [682c06a0]  JSON v0.21.1 v0.21.1
    Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_y3T9Rt/Manifest.toml`
  [336ed68f]  CSV v0.8.4 v0.8.4
  [682c06a0]  JSON v0.21.1 v0.21.1

(jl_y3T9Rt) pkg> rm --all
    Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_y3T9Rt/Project.toml`
  [336ed68f] - CSV v0.8.4
  [682c06a0] - JSON v0.21.1
    Updating `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_y3T9Rt/Manifest.toml`
  [336ed68f] - CSV v0.8.4
  [9a962f9c] - DataAPI v1.6.0
  [e2d170a0] - DataValueInterfaces v1.0.0
...

(jl_y3T9Rt) pkg> st
      Status `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_y3T9Rt/Project.toml` (empty project)

(jl_y3T9Rt) pkg> rm --all
ERROR: rm requires at least one package

The same can be achieved with the all_pkgs kwarg on the Pkg. variants

@KristofferC
Copy link
Sponsor Member

KristofferC commented Mar 16, 2021

Can we also add something about this to the brand new CHANGELOG file? https://github.com/JuliaLang/Pkg.jl/blob/master/CHANGELOG.md.

@IanButterworth IanButterworth changed the title add --all operator to rm, pin, free add --all option to rm, pin, free Mar 18, 2021
@IanButterworth IanButterworth merged commit af7e41c into JuliaLang:master Mar 18, 2021
@IanButterworth IanButterworth deleted the ib/add_more_all branch March 18, 2021 03:14
@00vareladavid
Copy link
Contributor

Should this also close #1211?

@kcajf
Copy link

kcajf commented Jan 11, 2022

I am trying free --all on Julia 1.7.1. I have one package devd, and a few others installed properly. free --alll doesn't work - it errors on the first package saying it expects it to be pinned or tracking a path.

Is this expected behaviour / is anyone able to reproduce please? I would expect free to only free the free-able packages and ignore the rest.

@IanButterworth
Copy link
Sponsor Member Author

Ah, yeah we need --all to behave like any in these cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants