---
title: "Deprecating Slice Definitions"
url: https://docs.zeroc.com/ice/3.8/slice/deprecating-slice-definitions
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Deprecating Slice Definitions

All Slice compilers support a metadata directive that allows you to deprecate a Slice definition. For example:

```slice
interface Example
{
    ["deprecated:Use alternativeOperation instead."]
    void someOperation();

    void alternativeOperation();
}
```

The message that follows the colon is optional, and says why the definition is deprecated or what to use instead. You can apply the `["deprecated"]` metadata directive to interfaces, classes, exceptions, structures, enumerations, enumerators, sequences, dictionaries, constants, operations, and fields.

The Slice compilers warn about a Slice definition that uses a deprecated definition, such as an operation whose parameter type is deprecated.

## See Also

- [`@deprecated` Doc-Comment Tag](https://docs.zeroc.com/ice/3.8/slice/documenting-slice-definitions/doc-comment-structure.md#@deprecated)
