Depending on your needs and the above tutorial, you can follow the steps below to uninstall ROCm on your Ubuntu system:
-
Uninstall a specific metapackage. If you know the name of the specific metapackage you want to uninstall, you can use the following command to uninstall it:
sudo apt autoremove <package-name>
For example, if you want to uninstall
rocm-libs
a package, you can runsudo apt autoremove rocm-libs
. -
Completely uninstall the ROCm package. If you want to uninstall all ROCm packages, you can use the following command:
sudo apt autoremove rocm-core
This will uninstall all ROCm packages.
-
Uninstall a kernel-mode driver. If you also want to uninstall kernel-mode drivers, you can use the following command:
sudo apt autoremove amdgpu-dkms
-
Remove ROCm and AMDGPU repositories. You can remove the ROCm and AMDGPU repositories with the following commands:
sudo rm /etc/apt/sources.list.d/rocm.list sudo rm /etc/apt/sources.list.d/amdgpu.list
-
Clean cache and system. You can use the following commands to clean up APT's cache and system:
sudo rm -rf /var/cache/apt/* sudo apt-get clean all
-
Restart the system. Finally, you need to restart your system to complete the uninstallation process:
sudo reboot
<package-name>
Please note that you need to replace the and in the above command according to your actual situation <release version>
.