Windows

Where Does MSYS2 Keep Home Files and Packages?

MSYS2 lives in one Windows folder with home dirs and a pacman cache inside. The default layout and what to keep.

Last updated

MSYS2 installs into a single Windows folder, by default C:\msys64. Everything Unix style hangs off it: home dirs under home, the pacman cache under var/cache/pacman/pkg, logs under var/log. The installer warns against spaces and long paths for good reason.

Your personal files live in C:\msys64\home\<user>, alongside shell dotfiles. Reinstalls wipe the folder, so that home dir plus a package list from pacman -Qqe are the two things to export first. Move the old pkg cache into a fresh install to skip re-downloading.

Where MSYS2 stores this, by platform

Windows
C:\msys64\home

Per user home dirs with dotfiles. Package cache sits at C:\msys64\var\cache\pacman\pkg; prune it with pacman -Sc. Uninstalling deletes the whole tree including home, so back that folder up first.

Frequently asked questions

how do i back up msys2 before reinstalling

Save pacman -Qqe output to a file, copy your home/<user> folder out, and stash var/cache/pacman/pkg to reuse. After reinstalling, restore the cache, install the package list, then merge dotfiles back.

where is the msys2 package cache

At <install>/var/cache/pacman/pkg, by default C:\msys64\var\cache\pacman\pkg. It accumulates every downloaded package, so it grows steadily. Run pacman -Sc to drop superseded versions.

Notice an outdated path? Let us know.