vix remove removes a package dependency from the current project lockfile.
Use it when your project no longer needs a locked package dependency.
vix remove gk/jwtvix remove removes one dependency from:
vix.lockIt can also delete the project-local dependency folder under:
.vix/deps/when --purge is used.
It does not remove a package from the Vix Registry.
It does not uninstall a global package.
It does not currently rewrite vix.json.
vix remove [@]namespace/name[@version]
vix remove [@]namespace/name[@version] --purge [-y]# Remove a locked dependency
vix remove gk/jwt
# Scoped-style syntax
vix remove @gk/jwt
# Remove only if the locked version matches
vix remove gk/jwt@1.0.0
# Scoped-style syntax with version
vix remove @gk/jwt@1.0.0
# Remove and delete project-local dependency files
vix remove @gk/jwt --purge
# Remove and purge without confirmation
vix remove @gk/jwt --purge -yWhen you run:
vix remove gk/jwtVix does this:
- Parses the package target.
- Reads
vix.lock. - Finds the matching dependency in the lockfile.
- Removes the first matching dependency entry.
- Writes the updated
vix.lock. - Optionally deletes
.vix/deps/<namespace>.<name>when--purgeis used. - Prints a tip to regenerate dependency integration if needed.
vix remove currently removes from:
vix.lockIt does not remove the dependency declaration from:
vix.jsonSo after removing a dependency, check whether vix.json still contains it.
If it is still declared there, remove it manually or use the dependency workflow that matches your project.
A package target uses this format:
namespace/nameExamples:
gk/jwt
gk/jsonScoped-style syntax is also accepted:
@namespace/nameExample:
@gk/jwtBoth forms refer to the same dependency id:
gk/jwtYou can pass a version:
vix remove gk/jwt@1.0.0When a version is provided, Vix removes the dependency only if the locked dependency matches that version.
Vix checks:
version
tagIf the lockfile uses a tag like:
v1.0.0then this still matches:
vix remove gk/jwt@1.0.0vix remove requires:
vix.lockIf the lockfile is missing, Vix reports:
missing lock file: /path/to/project/vix.lock
Run: vix add <pkg>@<version> firstThis command is lockfile-based.
vix remove expects a lockfile with:
{
"dependencies": [
{
"id": "gk/jwt",
"version": "1.0.0"
}
]
}If the lockfile does not contain a dependencies array, Vix reports:
invalid lock: missing 'dependencies' array
Tip: regenerate lock by re-adding dependenciesRun:
vix remove gk/jwtExample output shape:
Remove
id: gk/jwt
✔ removed from vix.lock: gk/jwt
✔ lock: /home/user/api/vix.lock
⚠ Tip: run 'vix install' to regenerate .vix/vix_deps.cmake if needed.Run:
vix remove gk/jwt@1.0.0Example output shape:
Remove
id: gk/jwt
version: 1.0.0
✔ removed from vix.lock: gk/jwt
✔ lock: /home/user/api/vix.lock
⚠ Tip: run 'vix install' to regenerate .vix/vix_deps.cmake if needed.If the dependency exists but the version does not match, Vix reports:
dependency not found in lock: gk/jwt
Tip: use 'vix list' to check current depsUse --purge to delete the project-local dependency folder.
vix remove gk/jwt --purgeFor package:
gk/jwtVix deletes:
.vix/deps/gk.jwtThe folder format is:
.vix/deps/<namespace>.<name>Examples:
| Package | Project-local dependency folder |
|---|---|
gk/jwt |
.vix/deps/gk.jwt |
gk/json |
.vix/deps/gk.json |
adastra/http |
.vix/deps/adastra.http |
When --purge is used, Vix asks for confirmation before deleting files.
Example:
This will also delete files from this project:
/home/user/api/.vix/deps/gk.jwt
Type DELETE to confirm:You must type:
DELETEIf you type anything else, Vix cancels:
cancelledUse -y or --yes:
vix remove gk/jwt --purge -yor:
vix remove gk/jwt --purge --yesThis skips confirmation and deletes the project-local dependency folder if it exists.
--purge deletes the project-local dependency folder under:
.vix/deps/It does not delete the global Git store.
It does not delete registry metadata.
It does not delete a globally installed package.
For global packages, use the global uninstall workflow.
vix remove can affect:
vix.lock
.vix/deps/<namespace>.<name> # only with --purgeIt may require regenerating:
.vix/vix_deps.cmakeThat is why Vix prints:
vix installafter removal.
After removing a dependency, validate the project.
vix install
vix build
vix check --testsIf your source code still includes headers from the removed package, the build will fail.
Remove those includes and target links.
For vix.app projects, check these places after removal:
vix.lock
vix.json
vix.appIf the package is still declared in vix.app, remove it from:
deps = [
gk/jwt@^1.0.0,
]
links = [
gk::jwt,
]Example cleanup:
deps = [
]
links = [
vix::vix,
]Then run:
vix install
vix buildFor CMake projects, remove the dependency link if the target is no longer used.
Example before:
target_link_libraries(api PRIVATE
gk::jwt
)After:
target_link_libraries(api PRIVATE
)Then regenerate dependency integration if needed:
vix install
vix build| Command | Purpose |
|---|---|
vix remove <pkg> |
Remove a locked dependency from the current project. |
vix uninstall -g <pkg> |
Remove a globally installed package. |
Use vix remove for project dependencies.
Use vix uninstall -g for global packages.
| Action | Result |
|---|---|
vix remove <pkg> |
Updates vix.lock. |
vix remove <pkg> --purge |
Updates vix.lock and deletes .vix/deps/<namespace>.<name>. |
manual delete from .vix/deps |
Deletes files but leaves lockfile unchanged. |
manual edit of vix.lock |
Not recommended. |
Prefer vix remove.
Remove the dependency:
vix remove gk/jwtRegenerate dependency integration:
vix installRemove usage from source code, vix.app, or CMake.
Validate:
vix build
vix check --testsvix remove gk/jwt --purge -y
vix install
vix build
vix check --testsUse --purge when you want to clean project-local dependency files too.
| Option | Description |
|---|---|
--purge |
Delete local package files under .vix/deps/<namespace>.<name>. |
-y |
Skip confirmation when using --purge. |
--yes |
Same as -y. |
-h, --help |
Show command help. |
| Command | Description |
|---|---|
vix remove gk/jwt |
Remove gk/jwt from vix.lock. |
vix remove @gk/jwt |
Same using scoped-style syntax. |
vix remove gk/jwt@1.0.0 |
Remove only if version matches. |
vix remove @gk/jwt --purge |
Remove and ask before deleting project-local files. |
vix remove @gk/jwt --purge -y |
Remove and delete project-local files without confirmation. |
vix remove gk/jwt
vix install
vix buildvix remove @gk/jwt
vix install
vix buildvix remove gk/jwt@1.0.0
vix install
vix buildvix remove @gk/jwt --purge -y
vix install
vix buildvix remove gk/jwt
vix install
vix check --testsvix remove only affects the current project.
It does not remove anything from the registry.
Wrong:
vix remove gk/jwtwhen you mean a global install.
Use the global uninstall command instead:
vix uninstall -g gk/jwtThe current command removes from vix.lock.
Check vix.json after removal.
If the dependency is still declared there, remove or update it intentionally.
For vix.app projects, also remove unused entries from:
deps
linksFor CMake projects, remove unused target links such as:
target_link_libraries(api PRIVATE gk::jwt)After removing a dependency, remove includes such as:
#include <jwt/api.hpp>Then run:
vix check --testsAfter changing dependency state, run:
vix installThis regenerates:
.vix/vix_deps.cmakeWrong:
vix remove jwtCorrect:
vix remove gk/jwtIf you run:
vix removeVix reports a missing package id and shows help.
Use:
vix remove namespace/nameExample:
vix remove gk/jwtUse a valid package id:
namespace/nameValid:
vix remove gk/jwt
vix remove @gk/jwtInvalid:
vix remove jwt
vix remove @/jwt
vix remove gk/If Vix reports:
missing lock filethe project has no vix.lock.
Check the current directory.
If this is a Vix project with dependencies, recreate dependency state:
vix add <pkg>or restore vix.lock from version control.
If Vix reports:
invalid lock: missing 'dependencies' arrayregenerate the lockfile by re-adding dependencies or restoring a valid lockfile.
If Vix reports:
dependency not found in lock: gk/jwtcheck current dependencies:
vix listThe package may already be removed, or the id may be different.
When using --purge, type exactly:
DELETEor pass:
-yif you intentionally want to skip confirmation.
If Vix reports:
failed to delete: .vix/deps/gk.jwtcheck permissions:
ls -ld .vix/deps/gk.jwtThen fix ownership or remove manually if needed.
Use vix list before removing dependencies.
Remove the dependency from source code before or after running vix remove.
For vix.app, remove unused package specs from deps.
For vix.app, remove unused CMake aliases from links.
For CMake, remove unused target_link_libraries entries.
Run vix install after removing dependencies.
Run vix build after removal.
Run vix check --tests before committing.
Use --purge when you want to clean .vix/deps.
Do not manually edit vix.lock.
Do not confuse project dependencies with global packages.
| Command | Purpose |
|---|---|
vix add |
Add a project dependency. |
vix install |
Install dependencies from vix.lock. |
vix update |
Update dependency versions. |
vix outdated |
Check outdated dependencies. |
vix list |
List project dependencies. |
vix install |
Regenerate dependency integration files. |
vix uninstall |
Remove Vix or a global package. |
vix check |
Validate after removing dependencies. |
List project dependencies.