The dnvm prune command removes older SDK versions from tracked channels to help manage disk space.
dnvm pruneThe prune command only removes SDKs that were installed through tracked channels. It will never remove:
- SDKs installed manually using
dnvm install <version> - SDKs restored from
global.jsonfiles usingdnvm restore - SDKs from untracked channels
Within each tracked channel, SDKs are grouped by major.minor version (e.g., 8.0.x, 8.1.x). Only the newest patch version in each group is kept.
# Track the 8.0 channel and update multiple times
dnvm track 8.0
dnvm update # Installs 8.0.100
dnvm update # Later installs 8.0.101
dnvm update # Later installs 8.0.102
# Before prune: 8.0.100, 8.0.101, 8.0.102 (all from 8.0 channel)
dnvm prune
# After prune: 8.0.102 (only the latest remains)# Mixed installation sources
dnvm track 8.0
dnvm update # Installs 8.0.100 (tracked channel)
dnvm install 8.0.101 # Manual install
dnvm update # Installs 8.0.102 (tracked channel)
dnvm prune
# After prune: 8.0.101 (manual), 8.0.102 (latest from channel)
# Note: 8.0.100 removed, 8.0.101 preserved (manual install)dnvm list- Show installed SDKs and their sourcesdnvm update- Update tracked channels to latest versionsdnvm uninstall- Remove a specific SDK version