TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/moonrepo/moon/llms.txt
Use this file to discover all available pages before exploring further.
moon upgrade command can be used to upgrade your current moon binary (if installed globally)
to the latest version.
~/.moon directory, using our official
installation script. If installed another way, you’ll need to upgrade manually.
:::
How It Works
The upgrade process:- Checks for updates - Queries the latest version from the manifest
- Downloads binary - Downloads the appropriate binary for your platform
- Replaces executable - Safely replaces the running binary
- Cleans up - Removes temporary files
Installation Requirements
The upgrade command works only when:Installed via Official Script
Installed in ~/.moon Directory
Moon must be in~/.moon/bin/:
Installed via proto
If installed via proto, use proto to upgrade:Unsupported Installations
The upgrade command will NOT work for:System Package Managers
Docker Containers
Upgrade by updating the container image:Custom Installations
If installed to a custom location:Version Checking
Before upgrading, moon checks if an update is available:Already Latest
Update Available
Offline Mode
If no internet connection:Platform Support
The upgrade command supports:Linux
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
macOS
- x86_64-apple-darwin (Intel)
- aarch64-apple-darwin (Apple Silicon)
Windows
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc
Safety Features
Self-Replacement
The upgrade safely replaces the running binary:- Renames current - Moves current binary to
.backup - Installs new - Downloads and installs new version
- Preserves permissions - Maintains executable permissions
- Atomic operation - Uses rename for atomicity
Rollback
If upgrade fails, the backup remains:Examples
Basic upgrade
Check current version
Upgrade via proto
CI/CD Usage
In CI, pin to specific versions instead:Automation
You can automate upgrades:Troubleshooting
Permission Denied
If you get permission errors:Download Fails
If download fails:- Check internet connection
- Verify firewall/proxy settings
- Try manual download:
Unsupported Platform
If you see:- Docker containers
- Build from source
- Use a supported platform
Version Information
To check your current version:Release Notes
View release notes at:Configuration
The upgrade process can be configured:See Also
moon setup- Setup toolchainsmoon teardown- Teardown environment- Installation - Install moon
- proto - Toolchain manager