---
title: "lean library remove"
description: "API reference for the command `lean library remove` in command line console."
canonical: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-library-remove
markdown: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-library-remove.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/05%20Lean%20CLI/99%20API%20Reference/32%20lean%20library%20remove
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# lean library remove

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Lean CLI](https://www.quantconnect.com/docs/v2/lean-cli.md) > [API Reference](https://www.quantconnect.com/docs/v2/lean-cli/api-reference.md) > lean library remove

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

Remove a custom library from a project.

```
$ lean library remove [OPTIONS] PROJECT NAME
```

To use the CLI, you must be a member in an [organization](https://www.quantconnect.com/docs/v2/cloud-platform/organizations/tier-features.md) on a paid tier.

## Description

Removes a library from a project. This command can remove libraries that are added using `lean library add`, as well as libraries that were manually added to the C# project file or a Python project's `requirements.txt` file.

C# libraries are removed from your C# project file (the file ending in `.csproj`). If `dotnet` is on your `PATH` and `--no-local` is not given, the CLI also restores all dependencies using `dotnet restore`.

Third-party Python libraries are removed from your project's `requirements.txt` file.

Project libraries are removed from your [project configuration file](https://www.quantconnect.com/docs/v2/lean-cli/projects/configuration.md).

## Arguments

The `lean library remove` command expects the following arguments:

| Argument | Description |
| --- | --- |
| `<project>` | The path to the project directory. |
| `<name>` | For third-party C# libraries, the name of the NuGet package to remove. For third-party Python libraries, the name of the PyPI package to remove. For project libraries, the path to the library in the `Library` directory of your [organization workspace](https://www.quantconnect.com/docs/v2/lean-cli/initialization/organization-workspaces.md). |

## Options

The `lean library remove` command supports the following options:

| Option | Description |
| --- | --- |
| `--no-local` | Skip making changes to your local environment |
| `--verbose` | Enable debug logging |
| `--help` | Display the help text of the `lean library remove` command and exit |
