Vcpkg: Remove multiple packages at once (wildcards)

Created on 14 Feb 2018  路  10Comments  路  Source: microsoft/vcpkg

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

vcpkg-feature

Most helpful comment

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

All 10 comments

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

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

@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

Yep. I'm talking about a possible implementation

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

Any news ?

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

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.

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 $_ }

Was this page helpful?
0 / 5 - 0 ratings