vix remove
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/jwtOverview
vix 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.
Usage
vix remove [@]namespace/name[@version]
vix remove [@]namespace/name[@version] --purge [-y]2
Basic examples
# 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 -y2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
What it does
When 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.
Important behavior
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.
Package format
A package target uses this format:
namespace/nameExamples:
gk/jwt
gk/json2
Scoped-style syntax is also accepted:
@namespace/nameExample:
@gk/jwtBoth forms refer to the same dependency id:
gk/jwtVersion matching
You 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
tag2
If the lockfile uses a tag like:
v1.0.0then this still matches:
vix remove gk/jwt@1.0.0Lockfile requirement
vix remove requires:
vix.lockIf the lockfile is missing, Vix reports:
missing lock file: /path/to/project/vix.lock
Run: vix add <pkg>@<version> first2
This command is lockfile-based.
Lockfile format
vix remove expects a lockfile with:
{
"dependencies": [
{
"id": "gk/jwt",
"version": "1.0.0"
}
]
}2
3
4
5
6
7
8
If the lockfile does not contain a dependencies array, Vix reports:
invalid lock: missing 'dependencies' array
Tip: regenerate lock by re-adding dependencies2
Remove from lockfile
Run:
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.2
3
4
5
Remove with version
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.2
3
4
5
6
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 deps2
Purge project-local files
Use --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 |
Purge confirmation
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:2
3
You must type:
DELETEIf you type anything else, Vix cancels:
cancelledSkip purge confirmation
Use -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.
What --purge does not delete
--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.
What files are affected
vix remove can affect:
vix.lock
.vix/deps/<namespace>.<name> # only with --purge2
It may require regenerating:
.vix/vix_deps.cmakeThat is why Vix prints:
vix installafter removal.
After removing a package
After removing a dependency, validate the project.
vix install
vix build
vix check --tests2
3
If your source code still includes headers from the removed package, the build will fail.
Remove those includes and target links.
Using remove with vix.app
For vix.app projects, check these places after removal:
vix.lock
vix.json
vix.app2
3
If the package is still declared in vix.app, remove it from:
deps = [
gk/jwt@^1.0.0,
]
links = [
gk::jwt,
]2
3
4
5
6
7
Example cleanup:
deps = [
]
links = [
vix::vix,
]2
3
4
5
6
Then run:
vix install
vix build2
Using remove with CMake
For CMake projects, remove the dependency link if the target is no longer used.
Example before:
target_link_libraries(api PRIVATE
gk::jwt
)2
3
After:
target_link_libraries(api PRIVATE
)2
Then regenerate dependency integration if needed:
vix install
vix build2
Difference between vix remove and vix uninstall
| 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.
Difference between vix remove and manual cleanup
| 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.
Full workflow
Remove the dependency:
vix remove gk/jwtRegenerate dependency integration:
vix installRemove usage from source code, vix.app, or CMake.
Validate:
vix build
vix check --tests2
Full purge workflow
vix remove gk/jwt --purge -y
vix install
vix build
vix check --tests2
3
4
Use --purge when you want to clean project-local dependency files too.
Options
| 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. |
Commands reference
| 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. |
Common workflows
Remove a dependency
vix remove gk/jwt
vix install
vix build2
3
Remove a scoped dependency
vix remove @gk/jwt
vix install
vix build2
3
Remove a specific version
vix remove gk/jwt@1.0.0
vix install
vix build2
3
Remove and purge files
vix remove @gk/jwt --purge -y
vix install
vix build2
3
Remove and validate
vix remove gk/jwt
vix install
vix check --tests2
3
Common mistakes
Expecting remove to unpublish a package
vix remove only affects the current project.
It does not remove anything from the registry.
Expecting remove to uninstall global packages
Wrong:
vix remove gk/jwtwhen you mean a global install.
Use the global uninstall command instead:
vix uninstall -g gk/jwtExpecting remove to update vix.json
The current command removes from vix.lock.
Check vix.json after removal.
If the dependency is still declared there, remove or update it intentionally.
Forgetting to update vix.app
For vix.app projects, also remove unused entries from:
deps
links2
Forgetting to update CMake
For CMake projects, remove unused target links such as:
target_link_libraries(api PRIVATE gk::jwt)Forgetting to update source code
After removing a dependency, remove includes such as:
#include <jwt/api.hpp>Then run:
vix check --testsForgetting to regenerate dependency integration
After changing dependency state, run:
vix installThis regenerates:
.vix/vix_deps.cmakeUsing wrong package format
Wrong:
vix remove jwtCorrect:
vix remove gk/jwtTroubleshooting
Missing package id
If you run:
vix removeVix reports a missing package id and shows help.
Use:
vix remove namespace/nameExample:
vix remove gk/jwtPackage id cannot be empty
Use a valid package id:
namespace/nameValid:
vix remove gk/jwt
vix remove @gk/jwt2
Invalid:
vix remove jwt
vix remove @/jwt
vix remove gk/2
3
Missing lock file
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.
Invalid lockfile
If Vix reports:
invalid lock: missing 'dependencies' arrayregenerate the lockfile by re-adding dependencies or restoring a valid lockfile.
Dependency not found in lock
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.
Purge cancelled
When using --purge, type exactly:
DELETEor pass:
-yif you intentionally want to skip confirmation.
Failed to delete project-local files
If Vix reports:
failed to delete: .vix/deps/gk.jwtcheck permissions:
ls -ld .vix/deps/gk.jwtThen fix ownership or remove manually if needed.
Best practices
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.
Related commands
| 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. |
Next step
List project dependencies.