Reference
Arcane.environment.remove()
Deletes one configured entry. Requires environment.write and explicit application admission.
This focused page is derived from the mechanically checked full member inventory.
Syntax
Arcane.environment.remove(name)
Parameters
name: environment-variable name
Return value
Promise<{name, deleted:true}>
Description
Deletes one configured entry. Requires environment.write and explicit application admission.
Overview
Deletes one Arcane-managed environment entry: user-scoped on desktop and
app-scoped on Android. This exclusive Vault mutation is not reversible through
the API, so require a clear user confirmation and do not treat deletion as a way
to hide a value temporarily. Android rejects removal of PATH with
ENVIRONMENT_PATH_UNSUPPORTED.
Return value and errors
Requires environment.write and resolves to {name,deleted:true} only when the
native host removed the exact case-insensitive name requested. A missing entry
rejects with ENVIRONMENT_ENTRY_NOT_FOUND; response-identity mismatches fail
closed instead of reporting success.
Mutation uncertainty and recovery
Removal uses the same serialized mutation boundary as set(). Treat
ENVIRONMENT_OPERATION_BUSY, ENVIRONMENT_RECOVERY_REQUIRED,
ENVIRONMENT_SERIALIZATION_RELEASE_FAILED, platform cleanup/commit uncertainty,
and Android storage uncertainty as a recovery workflow—not permission to retry
immediately. Only the public error code survives renderer normalization today.
Refresh list() first and ask the user how to proceed if the resulting state
cannot be established safely.
Example
async function removeSyntheticEnvironmentEntry() {
return Arcane.environment.remove('ARCANE_DEMO_TOKEN');
}
document.querySelector('#remove-demo-entry')?.addEventListener(
'click',
async function handleEnvironmentRemoval() {
const result = await removeSyntheticEnvironmentEntry();
console.log(`Removed ${result.name}`);
}
);