---
title: "MGS6002: a charm is spelled by its retired name"
description: Fires when a run activates a built-in charm under a name magus has retired, such as relock, and no selected target declares that name itself. The run stops and names the replacement, because the old name matches nothing.
tags: [MGS6002, charms, relock, update, upgrade, renamed]
---

# MGS6002: a charm is spelled by its retired name

A run asked for a built-in charm by a name magus no longer answers to:

```text
[MGS6002] charm "relock" was renamed "update" in v0.5.0 and nothing answers to the old
name; spell it `:update`
  see: https://eli.gladman.cc/magus/reference/codes/charms/MGS6002/
```

The name can come from the target suffix (`magus run generate:relock .`), from
`default_charms` in magus.yaml, or from any other source of active charms.

## Why

v0.5.0 renamed the `relock` charm to `update` with no alias. A charm no selected target
declares is normally only a warning, because a function target may still read it. The
old name is different: nothing reads it any more, so the run would go ahead without the
grant it asked for, and a lockfile you meant to re-resolve would stay pinned while the run
reported success.

A target that declares a charm of its own named `relock` keeps it. The stop applies only
when no selected target declares the name.

## What to do

Rename the charm wherever it is spelled:

| retired  | since  | use      |
| -------- | ------ | -------- |
| `relock` | v0.5.0 | `update` |

```sh
# before
magus run generate:relock .
# after
magus run generate:update .
```

In magus.yaml, change `default_charms: [relock]` to `default_charms: [update]`. A
magusfile that reads the charm by name, `has_charm("relock")`, reads `has_charm("update")`.

`update` behaves as `relock` did: `ci` strips it, and `rw` does not include it. See
[charms.md](../../../concepts/charms.md).
