Skip to content

Instantly share code, notes, and snippets.

@erikvip
Last active April 4, 2024 12:26
Show Gist options
  • Save erikvip/63b236078d4ff4163fd3 to your computer and use it in GitHub Desktop.
Save erikvip/63b236078d4ff4163fd3 to your computer and use it in GitHub Desktop.
Import/Export Cygwin List of installed packages

Import & Export Cygwin List of installed Packages

If you want to go from 32 to 64 bit Cygwin but keep all the packages[1], you might find yourself in a spot where you would like to export the list of cygwin packages and also be able to install cygwin with all these packages again. I will tell you how. Open your Cygwin shell and enter

cygcheck -c -d | sed -e "1,2d" -e 's/ .*\$//' > packagelist

This will simply dump a list of installed packages. To install Cygwin 64 with these packages selected, download setup-x86_64[2] and execute it with the command line parameters

./setup-x86_64 -P `awk 'NR==1{printf \$1}{printf ",%s", \$1}' packagelist`
@kasumiru
Copy link

kasumiru commented Nov 17, 2023

cygcheck -c -d | sed -e "1,2d" -e 's/ .*\$//' | awk '{print $1}' | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/,/g'  > cygwin_list.txt

and after that on another Windows create bat file with:

setup-x86_64.exe -P _autorebase,adwaita-icon-theme,alternatives,archivemail,... etc full last list. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment