Skip to content

Instantly share code, notes, and snippets.

@bndabbs
Created April 4, 2016 13:54
Show Gist options
  • Select an option

  • Save bndabbs/83e0e1d11e3ec69f7f9b68bcb9d17b56 to your computer and use it in GitHub Desktop.

Select an option

Save bndabbs/83e0e1d11e3ec69f7f9b68bcb9d17b56 to your computer and use it in GitHub Desktop.
disable all yum repos
repos=$(yum -v repolist |grep Repo-id |awk '{print $3}'|awk -F/ '{print $1}')
for i in "${repos[@]}"; do yum-config-manager --disable $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment