Upgrading TensorRT#
Upgrading TensorRT to the latest version is only supported when the currently installed TensorRT version is equal to or newer than the last two public GA releases.
If you want to upgrade from an unsupported version, you should incrementally upgrade until you reach the latest version of TensorRT or uninstall and reinstall the newest version. If you have an EA version of TensorRT installed, you should first upgrade to the corresponding GA version.
Upgrading From TensorRT 11.x.x To TensorRT 11.2.1#
When upgrading between TensorRT 11.x releases (for example, from TensorRT 11.1.0 to TensorRT 11.2.1):
TensorRT 11.2.1 packages are built against CUDA 13.3 update 1. Download and install the cuda-13.3 Debian/RPM local repo, tar, or zip packages (or use
pip install --upgradefor Python wheels).Use the same upgrade commands as your current installation method (
apt-get install,dnf install,pip install --upgrade, or extract a new tar/zip into a new directory).Refer to the TensorRT 11.2.1 Release Notes Announcements for platform dependency upgrade details.
Using pip
Use the following
pipcommands to upgrade a Python Package Index (pip) installation:python3 -m pip cache remove "tensorrt*" python3 -m pip install --upgrade tensorrt tensorrt-lean tensorrt-dispatch
Using a Debian or RPM file
The Debian packages are designed to upgrade your development environment without removing any runtime components that other packages and programs might rely on. If you installed TensorRT 11.x.x using a Debian package and upgraded to TensorRT 11.2.x, your libraries (within minor versions) and headers will all be updated to TensorRT 11.2.x content.
When upgrading between TensorRT major versions, such as from TensorRT 10.x to TensorRT 11.x, runtime packages from both major versions will coexist and not be replaced. Only the development packages (C++ headers,
.afiles,.sofiles without a version) will be replaced when upgrading to a new TensorRT major version.Upgrading between TensorRT versions where the CUDA major version has changed will result in pulling in CUDA packages for the latest CUDA major version. Refer to the installation steps under Using The NVIDIA CUDA Network Repo For Debian Installation on how to install TensorRT for an older CUDA version.
After downloading the new local repo, use
apt-getto upgrade your system to the new version of TensorRT.os="ubuntu2x04" tag="11.x.x-cuda-x.x" sudo dpkg -i nv-tensorrt-local-repo-${os}-${tag}_1.0-1_amd64.deb sudo cp /var/nv-tensorrt-local-repo-${os}-${tag}/*-keyring.gpg /usr/share/keyrings sudo apt-get update sudo apt-get install tensorrt
After you upgrade, ensure the corresponding version shown by the
dpkg-query -W tensorrtcommand is11.x.x.x.If installing a Debian package on a system where the previously installed version was from a tar file, note that the Debian package will not remove the previously installed files. Removing the older version before installing the new version would be best to avoid compiling against outdated libraries unless a side-by-side installation is desired.
The RPM packages are designed to upgrade your development environment without removing any runtime components that other packages and programs might rely on. If you installed TensorRT 11.x.x using an RPM package and want to upgrade to TensorRT 11.2.x, your libraries (within minor versions) and headers will all be updated to TensorRT 11.2.x content.
When you upgrade between TensorRT versions where the CUDA major version has changed, this will result in pulling in CUDA packages for the latest CUDA major version. Refer to the installation steps under Using The NVIDIA CUDA Network Repo For RPM Installation on how to install TensorRT for an older CUDA version.
When upgrading between TensorRT major versions, such as from TensorRT 10.x to TensorRT 11.x, runtime packages from both major versions will coexist and not be replaced. Only the development packages (C++ headers,
.afiles,.sofiles without a version) will be replaced when upgrading to a new TensorRT major version.After you have downloaded the new local repo, run the following:
os="rhelx" tag="11.x.x-cuda-x.x" sudo rpm -Uvh nv-tensorrt-local-repo-${os}-${tag}-1.0-1.x86_64.rpm sudo dnf clean expire-cache sudo dnf install tensorrt
After you upgrade, ensure the corresponding version shown by the
rpm -q tensorrtcommand is11.x.x.x.
Using a tar file
If you upgrade using the tar file installation method, install TensorRT in a new location. Tar file installations can support multiple use cases, including having a full installation of TensorRT 11.x.x with headers and libraries side-by-side with a full installation of TensorRT 11.2.x. If the intention is to have the new version of TensorRT replace the old version, then the old version should be removed after the new version is verified.
For the new TensorRT tar file installation, update the environment variable
LD_LIBRARY_PATHto the absolute path containing the TensorRTlibdirectory.If installing a tar file on a system where the previously installed version was from a Debian package, note that the tar file installation will not remove the previously installed packages. Unless a side-by-side installation is desired, removing the previously installed
libnvinfer11,libnvinfer-dev, and other related packages would be best to avoid confusion.
Using a zip file
If you upgrade using the zip file installation method, install TensorRT in a new location. Zip file installations can support multiple use cases, including having a full installation of TensorRT 11.x.x with headers and libraries side-by-side with a full installation of TensorRT 11.2.x. If the intention is to have the new version of TensorRT replace the old version, then the old version should be removed after the new version is verified.
After unzipping the new version of TensorRT, you must either update the PATH environment variable to point to the new installation location or copy the DLL files to the location where you previously installed the TensorRT libraries. Refer to Zip File Installation for more information about setting the
PATHenvironment variable.
Post-Upgrade Validation#
After any upgrade, confirm the environment before rebuilding production engines:
Package version:
dpkg-query -W tensorrt,rpm -q tensorrt, orpython3 -m pip show tensorrtreports the expected 11.x.x.x (or target) version.Runtime load path:
LD_LIBRARY_PATH(Linux tar) orPATH(Windows zip) points at the newlib/bindirectory, not a retired install tree.CUDA alignment: driver and toolkit versions meet Prerequisites and the Support Matrix for the target TensorRT release.
Smoke test: run Build Your First Engine or
trtexec --onnx=<model> --saveEngine=<engine>on a representative model.API migration: for major-version jumps (10.x → 11.x), walk the NVIDIA TensorRT Migration Guide and rebuild engines; deserialized plans from the prior major version are not interchangeable without a rebuild.
Downgrading and Rollback#
TensorRT does not guarantee that engines, or timing caches built on a newer release will run on an older runtime. Rollback is a deployment retreat: restore the prior TensorRT install, rebuild engines if needed, and re-validate inference before returning traffic.
When to Roll Back#
Consider rollback when:
A post-upgrade build fails across representative models and fixes are not yet available.
Runtime deserialization or plugin loading fails after a minor upgrade (check Release Notes for known regressions).
CUDA or driver dependencies introduced by the upgrade cannot be satisfied in the target fleet.
Rollback is not a substitute for Version Compatibility planning; version-compatible engines still require rebuild and test when changing TensorRT versions.
Rollback Procedure by Install Method#
Mirror the upgrade paths above in reverse. Prefer side-by-side installs (tar/zip, or coexisting major-version Debian/RPM runtimes) until the previous environment is verified.
pip
Reinstall the prior wheel set (pin versions explicitly), for example:
python3 -m pip cache remove "tensorrt*" python3 -m pip install tensorrt==<prior-version> tensorrt-lean==<prior-version> tensorrt-dispatch==<prior-version>
Confirm with
python3 -m pip show tensorrt.
Debian / RPM
Install the previous local repo package (same
nv-tensorrt-local-repo-*flow as upgrade, with the oldertag).On major-version coexistence systems, runtime packages from both majors may remain installed; ensure your application links against the intended
libnvinfer*soname.If retreating fully, follow Uninstalling TensorRT for the newer packages before reinstalling the older repo.
tar / zip
Point
LD_LIBRARY_PATHorPATHback to the previous install directory (tar/zip supports side-by-side trees).Remove or rename the newer tree only after validation completes.
Post-rollback Validation Gates#
Before restoring production traffic:
Deserialize and run at least one golden engine built under the restored TensorRT version (rebuild if plans from the newer version cannot load).
Re-run accuracy or tolerance checks if precision flags or plugins changed between versions.
Confirm plugin and custom-op libraries match the restored TensorRT ABI (rebuild plugins after major downgrades).
Review Security Considerations: deserialize only plans built or rebuilt under the trusted rollback environment.
For package removal steps, refer to Uninstalling TensorRT.