vectordotdev/vector · error
already exists. Delete it (or move it aside) and re-run.
Error message
{} already exists. Delete it (or move it aside) and re-run. What it means
The `vdev release generate-cue` command refuses to overwrite an existing release CUE file (`<version>.cue`) in the repository. This is a safety guard so a re-run never clobbers previously generated release data. The user must explicitly delete or move the existing file before regenerating.
Solutions
- Delete or rename the existing CUE file shown in the message (e.g. `mv <path> <path>.bak`), then re-run the command.
- If the existing file is already correct, skip regeneration — the content you want may already be in place.
- Verify the version argument is correct; you may be accidentally targeting an already-released version.
Example fix
// before: re-run fails because output exists vdev release generate-cue 0.46.0 // after mv website/cue/releases/0.46.0.cue website/cue/releases/0.46.0.cue.bak vdev release generate-cue 0.46.0
Defensive patterns
Strategy: validation
Validate before calling
if test -e website/cue/releases/<version>.cue; then echo 'delete or move it aside first'; exit 1; fi
Prevention
- Run release generation on a clean branch with no prior artifacts for the target version.
- Check `git status` for leftover release files before regenerating.
- Keep generated release artifacts out of the working tree until finalized.
When it happens
Trigger: Running `vdev release generate-cue` when the target file `repo_root/<...>/<new_version>.cue` already exists on disk (checked via `cue_path.exists()` in `run`).
Common situations: Re-running the release command after a failed or partial run that already wrote the CUE file; generating a release for a version that was previously released; regenerating to pick up fragment changes without cleaning up the old output.
Understand the failure class
Background: "already exists" / EEXIST / FileAlreadyExistsException: what the 'file already exists' error means and how to fix it — this error's family across 37 libraries.
Related errors
- already exists for release . Delete it (or move it aside)…
- Could not find latest addition commit
- Could not find the commit that added
- ` ` failed (exit )
- The specified version
AI-assisted analysis of vectordotdev/vector@0d4ab78a4f (2026-09-16).
Data as JSON: /api/errors/adaa29aa77819d77.
Report an issue: GitHub.
Appendix: source
Thrown at vdev/src/commands/release/generate_cue.rs:78
let last_version = git::latest_release_version()?;
validate_single_bump(&last_version, new_version)?;
let new_version = new_version.clone();
// Capture today's date ONCE so the highlights filename and its frontmatter can never
// disagree if the run crosses UTC midnight.
let today = Utc::now().format("%Y-%m-%d").to_string();
let cue_path = repo_root
.join(RELEASES_DIR)
.join(format!("{new_version}.cue"));
let highlights_path = repo_root
.join(HIGHLIGHTS_DIR)
.join(upgrade_guide_filename(&today, &new_version));
if cue_path.exists() {
bail!(
"{} already exists. Delete it (or move it aside) and re-run.",
cue_path.display()
);
}
let stub_path = repo_root
.join("website")
.join("content")
.join("en")
.join("releases")
.join(format!("{new_version}.md"));
if stub_path.exists() {
bail!(
"{} already exists. Delete it (or move it aside) and re-run.",
stub_path.display()
);
}
// Note: the highlights collision is checked later, only if we're actually going to
// write it — so a manually-authored upgrade guide doesn't block a release with noView on GitHub (pinned to 0d4ab78a4f)