function clear(dataSources, options)

    arguments
        dataSources.MATLABSession (1,1) logical = true;
        dataSources.UserInstall (1,1) logical = false;
        options.Force (1,1) logical = false;
    end

    % Catch any error thrown by the internal APIs and rethrow it by hiding
    % the stack.
    try
        args = [namedargs2cell(dataSources) namedargs2cell(options)];
        target.internal.clear(args{:});
    catch exception
        throwAsCaller(exception);
    end
end

%   Copyright 2022 The MathWorks, Inc.
