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

Remove multiple packages at once (wildcards) #2793

Closed
patrikhuber opened this issue Feb 14, 2018 · 15 comments
Closed

Remove multiple packages at once (wildcards) #2793

patrikhuber opened this issue Feb 14, 2018 · 15 comments
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@patrikhuber
Copy link
Contributor

patrikhuber commented Feb 14, 2018

I'm trying to remove boost, and since vcpkg splits up boost into separate packages, this is about 30 or so packages to remove.
Wildcards don't seem to work, i.e.

.\vcpkg.exe remove boost*
Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are allowed

I couldn't find out how to remove all of them without writing either all 30 package names on the command-line or writing a separate powershell snipped (which frankly I can't do without googling and I don't want to get into that for just removing packages, which should be a simple task).

vcpkg help remove doesn't help either, in fact, incidentally, it gives outdated advice of doing vcpkg remove boost which doesn't work since the packages have been split.

.\vcpkg.exe help remove
Example:
  vcpkg remove zlib zlib:x64-windows curl boost

The vcpkg documentation and FAQ don't mention remove either.
Specifying the triplet in all of these commands (--triplet x64-windows doesn't help either and makes no difference).

How to do this supposedly simple task? :-O

@patrikhuber
Copy link
Contributor Author

Apart from the wildcard problem, there's probably another potential bug, in that vcpkg install boost works, but not vcpkg remove boost?

@KindDragon
Copy link
Contributor

I think to remove all boost packages from all triplets better use syntax like that: .\vcpkg.exe remove boost*:*. boost* should only affect current triplet

@patrikhuber
Copy link
Contributor Author

@KindDragon: I think wildcards for triplets are not supported yet, I've seen that being discussed in another issue. In any case it doesn't work:

.\vcpkg.exe remove boost*:*
Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are allowed

@KindDragon
Copy link
Contributor

Yep. I'm talking about a possible implementation

@stianval
Copy link

For boost specificially .\vcpkg.exe remove boost-vcpkg-helpers --recurse seems to remove most (if not all) boost packages.

@ghost
Copy link

ghost commented Sep 22, 2018

Any news ?

@dzenanz
Copy link
Contributor

dzenanz commented Dec 18, 2018

How about allowing syntax .\vcpkg.exe remove *:x86-windows to remove the entire x86-windows triplet?

@NancyLi1013 NancyLi1013 added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Feb 13, 2019
@gaojx
Copy link

gaojx commented Sep 12, 2019

Agree this is serious issue, especially for new users. It isn't a good user experience.

At minimal, the boost package should install a master package called boost, and all other sub-package should be dependency of boost. So vcpkg remove boost --recurse will remove all packages installed by boost.

@zewpo
Copy link

zewpo commented Sep 17, 2019

if you have powershell, you can conjure up something like this:
vcpkg list | % { $_.Split(" ") | Select-Object -first 1 } | Where-Object { $_ -like "*:x86-windows" } | ForEach-Object -Process { vcpkg remove --recurse $_ }

@PhoebeHui
Copy link
Contributor

Duplicated to #8486.

@htonus
Copy link

htonus commented Nov 17, 2020

.\vcpkg.exe remove boost-uninstall --recurse

@mingshi2333
Copy link

.\vcpkg.exe remove boost-uninstall --recurse

thanks

@mbsysde99
Copy link

for 64 bits:
C:\Program Files\Git\vcpkg>vcpkg remove boost-uninstall:x64-windows --recurse

for 32 bits:
C:\Program Files\Git\vcpkg>vcpkg remove boost-uninstall:x86-windows --recurse

@VenkyDevHub
Copy link

.\vcpkg.exe remove boost-uninstall:x86-windows --recurse
This above worked for me; it will just remove every boost-*:x86-windows package there is.

@VenkyDevHub
Copy link

for 64 bits: C:\Program Files\Git\vcpkg>vcpkg remove boost-uninstall:x64-windows --recurse

for 32 bits: C:\Program Files\Git\vcpkg>vcpkg remove boost-uninstall:x86-windows --recurse

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

No branches or pull requests