Vix.cpp v2.6.0 is here Read the blog
Skip to content

vix clean

vix clean removes local project cache directories.

Use it when you want to clean generated state from the current project without deleting the global Vix cache.

bash
vix clean
1

Overview

vix clean is a project-local cleanup command.

It removes only:

txt
.vix/
build/
1
2

It does not remove global Vix data.

That means it keeps:

txt
~/.vix/
~/.vix/registry/
~/.vix/store/
~/.vix/global/
~/.vix/cache/
1
2
3
4
5

Use vix clean when the project-local state is stale, broken, or no longer needed.

Usage

bash
vix clean
1

What it removes

vix clean removes these directories from the current project:

txt
.vix/
build/
1
2

Example:

txt
my-app/
├── .vix/
├── build/
├── src/
├── vix.app
└── vix.json
1
2
3
4
5
6

After:

bash
vix clean
1

the project becomes:

txt
my-app/
├── src/
├── vix.app
└── vix.json
1
2
3
4

What it does not remove

vix clean does not remove global Vix state.

It does not remove:

txt
~/.vix/
~/.vix/registry/index/
~/.vix/store/git/
~/.vix/global/installed.json
~/.vix/cache/build/
1
2
3
4
5

So your registry index, global packages, and global store remain available.

Basic usage

Run it inside a Vix project:

bash
cd api
vix clean
1
2

Output shape:

txt
Clean
  removing .vix/
  removing build/

✔ Project cache cleaned
1
2
3
4
5

If nothing exists to clean:

txt
Clean

⚠ Nothing to clean
1
2
3

When to use it

Use vix clean when:

txt
local generated state is stale
the project cache is broken
you want a fresh local build directory
you want to remove generated project files
you want to retry dependency integration cleanly
1
2
3
4
5

Common cases:

bash
vix clean
vix install
vix build
1
2
3

or:

bash
vix clean
vix install
vix dev
1
2
3

Clean before rebuilding

bash
vix clean
vix build
1
2

Use this when you want to remove the default local build directory before building again.

Clean before development mode

bash
vix clean
vix install
vix dev
1
2
3

Use this when project-local generated state may be stale before running development mode.

Clean after dependency issues

bash
vix clean
vix install
vix check --tests
1
2
3

Use this when dependency integration files under .vix/ may be outdated or broken.

Difference between vix clean and vix reset

CommandPurpose
vix cleanRemove .vix/ and build/ from the current project.
vix resetRun project cleanup and reinstall project dependencies.

Use vix clean when you only want to delete local generated state.

Use vix reset when you want cleanup plus dependency reinstall.

Clean workflow

Manual workflow:

bash
vix clean
vix install
vix build
1
2
3

Equivalent higher-level workflow:

bash
vix reset
vix build
1
2

Important behavior

vix clean ignores extra arguments in the current implementation.

The intended command is:

bash
vix clean
1

There are no command options in the current implementation.

Options

vix clean currently has no options.

CommandDescription
vix cleanRemove .vix/ and build/ from the current project.
vix clean --helpShow command help.

Commands reference

CommandDescription
vix cleanClean project-local generated state.
vix resetClean and reinstall project dependencies.
vix installInstall dependencies from vix.lock.
vix buildBuild the project.
vix devRun the development workflow.
vix infoInspect Vix paths and cache locations.
vix storeManage the local package store.

Common workflows

Clean local project state

bash
vix clean
1

Clean and reinstall dependencies

bash
vix clean
vix install
1
2

Clean and rebuild

bash
vix clean
vix install
vix build
1
2
3

Clean before dev mode

bash
vix clean
vix install
vix dev
1
2
3

Clean before validation

bash
vix clean
vix install
vix check --tests
1
2
3

Common mistakes

Expecting vix clean to remove global cache

vix clean does not remove:

txt
~/.vix/
1

For global store cleanup, use:

bash
vix store path
vix store gc --project --dry-run
1
2

For registry metadata, use:

bash
vix registry path
vix registry sync
1
2

For environment inspection, use:

bash
vix info
1

Expecting vix clean to reinstall dependencies

vix clean only removes local directories.

After cleaning, run:

bash
vix install
1

or use:

bash
vix reset
1

when you want cleanup plus reinstall.

Running outside the project directory

Wrong:

bash
cd ..
vix clean
1
2

Correct:

bash
cd api
vix clean
1
2

vix clean works relative to the current directory.

Expecting it to remove every build directory

The current implementation removes:

txt
.vix/
build/
1
2

It does not remove every possible custom build folder.

If your project uses a custom build folder such as:

txt
build-ninja/
build-release/
1
2

remove it manually or use the command that created it if another workflow manages that directory.

Expecting it to remove global packages

vix clean does not remove global packages.

Use:

bash
vix list -g
vix uninstall -g <package>
1
2

for global packages.

Troubleshooting

Nothing to clean

This means neither .vix/ nor build/ exists in the current directory.

It is not an error.

You can continue with:

bash
vix install
vix build
1
2

Project still behaves strangely after clean

Run:

bash
vix reset
1

or manually run:

bash
vix clean
vix install
vix check --tests
1
2
3

Dependency state still looks wrong

Refresh the registry and reinstall:

bash
vix registry sync
vix clean
vix install
1
2
3

Global cache issue remains

Inspect Vix global paths:

bash
vix info
1

Then inspect the store:

bash
vix store path
1

Preview cleanup before deleting anything:

bash
vix store gc --project --dry-run
1

Best practices

Run vix clean from the project root.

Use it for project-local generated state only.

Run vix install after cleaning when the project depends on registry packages.

Use vix reset when you want the full clean plus reinstall workflow.

Use vix info before touching global cache or store data.

Do not use vix clean when you only want to remove a dependency. Use vix remove.

Do not use vix clean when you want to remove Vix from the machine. Use vix uninstall.

CommandPurpose
vix resetClean and reinstall project dependencies.
vix installInstall dependencies from vix.lock.
vix buildBuild the project.
vix devRun the project in development mode.
vix checkValidate project health.
vix infoShow Vix paths and cache locations.
vix storeManage the local package store.
vix removeRemove a project dependency.
vix uninstallRemove Vix or a global package.

Next step

Continue with project reset.

Open the vix reset guide

Released under the MIT License.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.