%% %CopyrightBegin%
%%
%% SPDX-License-Identifier: Apache-2.0
%%
%% Copyright Ericsson AB 2021-2025. All Rights Reserved.
%%
%% %CopyrightEnd%

[;1m  purge_module(Module)[0m

  Removes old code for [;;4mModule[0m. Before this BIF is used, [;;4m[0m
  [;;4mcheck_process_code/2[0m is to be called to check that no processes
  execute old code in the module.

  [;;4mWarning[0m

    This BIF is intended for the code server (see [;;4mcode[0m) and is
    not to be used elsewhere.

  [;;4mChange[0m

    As from ERTS 8.0 (Erlang/OTP 19), any lingering processes that
    still execute the old code is killed by this function. In
    earlier versions, such incorrect use could cause much more
    fatal failures, like emulator crash.

  Failure: [;;4mbadarg[0m if there is no old code for [;;4mModule[0m.
