How to Uninstall olmocr: Complete Removal Guide for the Python Package and Dependencies
Uninstall olmocr using pip uninstall -y olmocr and manually remove optional extras like vllm and flashinfer to free up several gigabytes of disk space.
When you no longer need the OCR capabilities provided by the allenai/olmocr repository, completely removing the package requires more than a single pip command. Because olmocr is typically installed with optional extras such as [gpu], [beaker], or [bench], you must target those heavy dependencies separately to fully restore your environment.
Uninstall the Core olmocr Package
Start by removing the base package using pip. This command deletes the core olmocr module and its pure-Python dependencies from your environment.
pip uninstall -y olmocr
According to the project's CI configuration in .github/workflows/main.yml at line 107, this is the standard cleanup method used by the repository's own automated testing pipeline.
Remove Optional Dependencies and Extras
If you installed olmocr with extras—such as olmocr[gpu] for CUDA acceleration—you must manually uninstall the heavy binary dependencies that pip does not automatically remove with the base package.
GPU Extra Dependencies
The [gpu] extra installs several large CUDA-related packages. Remove them to reclaim several gigabytes of storage:
pip uninstall -y vllm flashinfer flashinfer-python flashinfer-cubin
Beaker and Bench Extras
For the [beaker] and [bench] extras, uninstall the following utilities:
pip uninstall -y beaker-py pytest
The repository's benchmark scripts in scripts/run_chandra_benchmark.sh (lines 337 and 438) demonstrate this cleanup pattern using uv pip uninstall --system, confirming these are the specific packages to target when removing the GPU and Beaker components.
Clean Up Residual Configuration
After removing the Python packages, delete any remaining configuration files or environments you created specifically for olmocr.
Remove the Conda Environment
If you created a dedicated Conda environment for this project:
conda env remove -n olmocr
Delete Local Workspace Folders
Remove the default OCR workspace folder that stores temporary processing data:
rm -rf ./localworkspace
Verify Complete Removal
Confirm that no olmocr-related packages remain by checking the package metadata. If the package is fully removed, this command will return "Package(s) not found".
pip show olmocr
Before uninstalling, you can also use pip show olmocr to inspect the Requires-Dist field, which lists which optional dependencies (like vllm or beaker-py) are installed on your system.
Summary
- Uninstall the core package with
pip uninstall -y olmocrto remove the base module and standard dependencies. - Manually remove GPU extras:
vllm,flashinfer,flashinfer-python, andflashinfer-cubinto reclaim disk space. - Remove Beaker and Bench extras:
beaker-pyandpytestif you installed those optional components. - Delete the Conda environment with
conda env remove -n olmocrif you used an isolated environment. - Remove the
./localworkspacedirectory to delete cached OCR data and temporary files.
Frequently Asked Questions
Does pip uninstall olmocr remove all dependencies automatically?
No. While pip uninstall -y olmocr removes the core package and its direct Python dependencies, it does not uninstall optional extras like vllm or flashinfer. You must manually uninstall these heavy GPU-related packages to fully free up disk space.
How do I know which extras were installed with olmocr?
Run pip show olmocr and examine the Requires-Dist field. This metadata lists all optional dependencies included with your installation, such as vllm for the GPU extra or beaker-py for the Beaker extra.
Where does the allenai/olmocr repository specify the uninstall process?
The repository documents this cleanup in .github/workflows/main.yml at line 107, which uses pip uninstall -y olmocr for CI cleanup, and in scripts/run_chandra_benchmark.sh at lines 337 and 438, which removes GPU packages using uv pip uninstall.
Can I uninstall olmocr if I installed it with uv instead of pip?
Yes. Substitute uv pip uninstall for pip uninstall in all commands. The repository's benchmark scripts specifically use uv pip uninstall --system to remove the GPU and Beaker packages, confirming compatibility with the uv package manager.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →