Deleting NIMs#

NIMs consume several gigabytes of data. To reclaim this storage space, delete a single NIM or all NIMs and NVIDIA AI Workbench.

Deleting a Single NIM#

  1. Delete the cache directory. To delete the .cache directory, log in as the root user and run the following commands:

    wsl -d NVIDIA-Workbench -u root
    rm -rf ~workbench/nimonwsl2/<registry-path>/tag/.cache
    
  2. Remove the container image.

    wsl -d NVIDIA-Workbench -- podman rmi <registry-path>:<tag>
    
  3. Stop WSL.

    wsl --terminate NVIDIA-Workbench
    
  4. Do one of the following:

    • Reduce the physical size of the dynamically expanding virtual hard disk (VHD) file. Start diskpart using an admin command prompt and run the following commands:

      select vdisk file="%LOCALAPPDATA%\NVIDIA Corporation\AI Workbench Distro\ext4.vhdx"
      compact vdisk
      
    • Optimize the allocation space used by virtual hard disk files.

      Optimize-VHD -Path "C:\Users\vrl\AppData\Local\NVIDIA Corporation\AI Workbench Distro\ext4.vhdx" -Mode Full
      

Deleting all NIMs and NVIDIA AI Workbench#

  1. Close the AI Workbench application if it is open.

  2. In a Windows command shell, run the following command:

    wsl -d NVIDIA-Workbench -u root -- /home/workbench/.nvwb/bin/nvwb-cli uninstall --uid 1000 --gid 1000
    
  3. You are prompted to confirm that you want to uninstall AI Workbench. Type y and press enter.

    Wait for the uninstall to complete before you proceed with the following steps.

  4. Uninstall NVIDIA AI Workbench using Control Panel. Select Control Panel > Programs > Uninstall a program > NVIDIA AI Workbench > Uninstall.

  5. Unregister the NVIDIA AI Workbench distribution. This step removes the distribution virtual drive. Save any important data before unregistering the distribution.

    wsl --unregister NVIDIA-Workbench
    
  6. Delete the NVIDIA AI Workbench folders from %LOCALAPPDATA%\NVIDIA Corporation. Delete both folders: AI Workbench and AI Workbench Distro. You may need to refresh the file explorer to see the effect.

  7. Delete the NVIDIA AI Workbench updater folder: %LOCALAPPDATA%\nvidia-workbench-updater.