How to update installed Nimble Packages
Nimble is the package manager for Nim Programming Language. Similar to Pip, you can easily install a package using Nimble. However, there is not a built-in command to update an installed package. Instead, when you re-install a package, it is updated.
For each package, nimble gathers the contents from the package's GitHub repo, so any commit in the repo is also reflected as an update when the package is re-installed.
To update all locally installed packages, I wrote a small Nimscript (A subset of Nim that can be evaluated on Nim's VM) to list all installed packages and update them by reinstalling them again. Below is the code for that script:
If you save the above code into a file named such as update_all.nims, you can run the code with the
nim e update_all.nims
nimble list --installed : lists installed nimble packages
(out, err)=gorgeEx(command:string): lets running a command and captures the output to out and exit code to err.