Skip to content

Instantly share code, notes, and snippets.

@dangdennis
Last active July 8, 2023 19:29
Show Gist options
  • Save dangdennis/19a6f8dbe9a45363419902596790bf1f to your computer and use it in GitHub Desktop.
Save dangdennis/19a6f8dbe9a45363419902596790bf1f to your computer and use it in GitHub Desktop.
Unpin all opam packages
#!/bin/bash
# Get the list of pinned packages
pinned_packages=$(opam list --pinned --short)
# Iterate through the list of pinned packages and unpin each one
for package in $pinned_packages; do
echo $package
opam unpin $package --yes
done
echo "All packages have been unpinned."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment