You can use pacman -Sw yourPackage

they will be downloaded to /var/cache/pacman/pkg

use --cachedir if you want to download the package to another folder

and to install them from that folder use: pacman -U dir/yourPackage1 dir/yourPackage2

Answer from Badr Elmers on Stack Overflow
🌐
MSYS2
msys2.org › docs › package-management
Package Management - MSYS2
The MSYS2 software distribution uses a port of pacman (known from Arch Linux) to manage (install, remove and update) binary packages and also to build those packages in the first place.
🌐
MSYS2
packages.msys2.org › packages › pacman
Package: pacman - MSYS2 Packages
A library-based package manager with dependency support (MSYS2 port) Group(s): - Repo: msys · Homepage: https://www.archlinux.org/pacman/ Repository: https://github.com/msys2/msys2-pacman · License(s): GPL-2.0-or-later · Version: 6.1.0-29 · External: Anitya · pacman · Arch Linux · 7.1.0.r9.g54d9411 · Repology · pacman · Installation: pacman -S pacman 📋 ·
🌐
MSYS2
umarcor.github.io › msys2.github.io › wiki › MSYS2-installation
MSYS2-Installation - MSYS2
For this reason, the safest procedure ... remaining packages by issuing: pacman -Suu · Installing new packages: pacman -S <package_names|package_groups> For example, pacman -S make gettext base-devel In this example...
🌐
MSYS2
packages.msys2.org › packages
Packages - MSYS2 Packages
Pending Updates · Repo Updates · Outdated Packages · Repos · Base Packages · Packages · Base Groups · Groups · Security · Search
🌐
Cadhut
cadhut.com › 2020 › 08 › 02 › how-to-set-up-and-use-msys2
How To Set Up And Use MSys2 – CadHut
August 2, 2020 - Press “Enter” to choose all packages, then “Enter” again when you are prompted to “Proceed with installation”. Typing “pacman -S <package name>” is how you add new packages to MSys2.
🌐
Mrtrix
mrtrix.org › download › windows-msys2
Windows pre-compiled MSYS2 install
If necessary, this can also be done by downloading the package directly from the latest release page on the MRtrix3 GitHub repository (the relevant file should be called mingw-w64-x86_64-mrtrix3-X.Y.Z-n-x86_64.pkg.tar.xz), and installing it using the pacman -U command (see links above for ...
🌐
EPICS Documentation
docs.epics-controls.org › en › latest › getting-started › installation-windows-msys2.html
Installation using MSYS2/MinGW — EPICS Documentation
If you want to cut down the needed ... gcc and gcc-libs. If you are not sure, check your set of tools is complete and everything is installed properly: $ pacman -Q ......
Find elsewhere
🌐
Git for Windows
gitforwindows.org › package-management.html
Git for Windows' package management
This can be achieved by switching to the subdirectory of /usr/src/MINGW-packages or /usr/src/MSYS2-packages, respectively, corresponding to the package you want to build, ensure that the src/ directory is populated (and call makepkg-mingw --nobuild -s or makepkg --nobuild -s otherwise), then patch the source code in the src/ subdirectory and after that call ... The makepkg script is part of the pacman package itself.
🌐
MSYS2 Packages
packages.msys2.org › base › pacman
Base Package: pacman - MSYS2 Packages
A library-based package manager with dependency support (MSYS2 port) Base Group(s): - Homepage: https://www.archlinux.org/pacman/ Repository: https://github.com/msys2/msys2-pacman · License(s): GPL-2.0-or-later · Version: 6.1.0-29 · External: Anitya · pacman · Arch Linux ·
🌐
SciVision
scivision.dev › install-msys2-windows
Install MSYS2 on Windows | Scientific Computing
June 27, 2026 - MinGW brings GNU compiler tools to Windows since the late 1990s. MSYS2 provides numerous developer tools including MinGW on Windows using pacman package manager.
🌐
Git for Windows
gitforwindows.org › install-inside-msys2-proper.html
Install inside MSYS2 proper
And finally install the packages containing Git, its documentation and some extra things: pacman -S mingw-w64-x86_64-{git,git-doc-html,git-doc-man} mingw-w64-x86_64-git-extra · Now you can close the current shell and open a MINGW64 shell (msys2_shell.cmd -mingw64) to check that everything went well.
🌐
GitHub
github.com › msys2 › msys2 › wiki › Using-packages
Using packages · msys2/msys2 Wiki · GitHub
March 26, 2020 - A software distro and building platform for Windows - Using packages · msys2/msys2 Wiki
Author: msys2
🌐
MSYS2
packages.msys2.org › packages › pacman-contrib
Package: pacman-contrib - MSYS2 Packages
Base Package: pacman-contrib · Description: Contributed scripts and tools for pacman systems (MSYS2 port) Group(s): - Repo: msys · Homepage: https://gitlab.archlinux.org/pacman/pacman-contrib · License(s): GPL-2.0-or-later · Version: 1.10.6-2 · External: Anitya · pacman-contrib · Arch Linux · 1.13.1 · AUR · 1.5.1.r11.g5455ffe · Repology · pacman-contrib · Installation: pacman -S pacman-contrib 📋 ·
🌐
Teo's Notebook
teonotebook.wordpress.com › 2019 › 03 › 16 › installing-msys2-on-windows
Installing msys2 on Windows | Teo's Notebook - WordPress.com
March 20, 2019 - # update the package database and core msys2 system packages pacman -Syuu # check what packages or pachage groups are available, you may use partial names pacman -Ss NAME_PATTERN # install a package or group if not already installed pacman -S NAME # listing the content of an installed package pacman -Ql NAME # uninstall a package or group pacman -R NAME