Uninstalling TensorRT#
When installing TensorRT using the Python Package Index, you must explicitly remove the Python module dependencies to uninstall it. For a CUDA 12.x installation, remove all TensorRT Python modules using the following example command.
python3 -m pip uninstall tensorrt tensorrt-cu12 tensorrt-cu12-bindings tensorrt-cu12-libs
To uninstall TensorRT using the tar file, delete the untarred files and reset LD_LIBRARY_PATH
to its original value.
To uninstall TensorRT using the zip file, delete the unzipped files and remove the newly added path from the PATH
environment variable.
When installing the Python TensorRT wheel files using a tar or zip file, use the following commands to uninstall them.
sudo python3 -m pip uninstall tensorrt
sudo python3 -m pip uninstall tensorrt_lean
sudo python3 -m pip uninstall tensorrt_dispatch
To uninstall TensorRT using the Debian or RPM packages, uninstall libnvinfer10
and other related packages.
sudo apt-get purge "libnvinfer*"
sudo apt-get purge "nv-tensorrt-local-repo*"
or
sudo yum erase "libnvinfer*"
sudo yum erase "nv-tensorrt-local-repo*"