This is an old version of ROCm documentation. Read the latest ROCm release documentation to stay informed of all our developments.

Uninstallation with package manager (Linux)

Uninstallation with package manager (Linux)#

Applies to Linux and Windows

2023-06-26

6 min read time

This section describes how to uninstall ROCm with the Linux distribution’s package manager. This method should be used if ROCm was installed via the package manager. If the installer script was used for installation, then it should be used for uninstallation too, refer to Installer Script Uninstallation (Linux).

Uninstalling Specific Meta-packages

# Uninstall single-version ROCm packages
sudo apt autoremove <package-name>
# Uninstall multiversion ROCm packages
sudo apt autoremove <package-name with release version>

Complete Uninstallation of ROCm Packages

# Uninstall single-version ROCm packages
sudo apt autoremove rocm-core
# Uninstall multiversion ROCm packages
sudo apt autoremove rocm-core<release version>

Uninstall Kernel-mode Driver

sudo apt autoremove amdgpu-dkms

Remove ROCm and AMDGPU Repositories

  1. Execute these commands:

    sudo rm /etc/apt/sources.list.d/<rocm_repository-name>.list
    sudo rm /etc/apt/sources.list.d/<amdgpu_repository-name>.list
    
  2. Clear the cache and clean the system.

    sudo rm -rf /var/cache/apt/*
    sudo apt-get clean all
    
  3. Restart the system.

    sudo reboot
    

Uninstalling Specific Meta-packages

# Uninstall single-version ROCm packages
sudo yum remove <package-name>
# Uninstall multiversion ROCm packages
sudo yum remove <package-name with release version>

Complete Uninstallation of ROCm Packages

# Uninstall single-version ROCm packages
sudo yum remove rocm-core
# Uninstall multiversion ROCm packages
sudo yum remove rocm-core<release version>

Uninstall Kernel-mode Driver

sudo yum autoremove amdgpu-dkms

Remove ROCm and AMDGPU Repositories

  1. Execute these commands:

    sudo rm -rf /etc/yum.repos.d/<rocm_repository-name> # Remove only rocm repo
    sudo rm -rf /etc/yum.repos.d/<amdgpu_repository-name> # Remove only amdgpu repo
    
  2. Clear the cache and clean the system.

    sudo rm -rf /var/cache/yum #Remove the cache
    sudo yum clean all
    
  3. Restart the system.

    sudo reboot
    

Uninstalling Specific Meta-packages

# Uninstall all single-version ROCm packages
sudo zypper remove <package-name>
# Uninstall all multiversion ROCm packages
sudo zypper remove <package-name with release version>

Complete Uninstallation of ROCm Packages

# Uninstall all single-version ROCm packages
sudo zypper remove rocm-core
# Uninstall all multiversion ROCm packages
sudo zypper remove rocm-core<release version>

Uninstall Kernel-mode Driver

sudo zypper remove --clean-deps amdgpu-dkms

Remove ROCm and AMDGPU Repositories

  1. Execute these commands:

    sudo zypper removerepo <rocm_repository-name>
    sudo zypper removerepo <amdgpu_repository-name>
    
  2. Clear the cache and clean the system.

    sudo zypper clean --all
    
  3. Restart the system.

    sudo reboot