Skip to content

Instantly share code, notes, and snippets.

@wallymathieu
Created February 26, 2012 10:30
Show Gist options
  • Save wallymathieu/1915916 to your computer and use it in GitHub Desktop.
Save wallymathieu/1915916 to your computer and use it in GitHub Desktop.
uninstall inactive ports
res = %x[port installed | grep -v -i '(active)' | grep -v 'The following ports are currently installed' | sed -e :a -e '\$!N; s\/\\n\/ \/; ta']
puts(res)
u = %x[port uninstall #{res}]
puts (u)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment