Created
January 6, 2014 10:06
-
-
Save jaymecd/8280674 to your computer and use it in GitHub Desktop.
remove all packages from PEAR channel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function pear_remove { | |
| local channel="$1" | |
| if [ -z $channel ]; then | |
| echo "Error: channel must be provided" | |
| return 1 | |
| fi | |
| for pkg in $(pear list -c "$channel" | awk '{if ( $2 ~ /([0-9]+)\.([0-9]+)\.([0-9]+)/ ) print $1}') ; do | |
| pear uninstall "$channel/$pkg" | |
| done | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment