Skip to content

Instantly share code, notes, and snippets.

@nikcorg
Created June 14, 2014 22:22
Show Gist options
  • Select an option

  • Save nikcorg/2a24f6ec63a58ce3e41f to your computer and use it in GitHub Desktop.

Select an option

Save nikcorg/2a24f6ec63a58ce3e41f to your computer and use it in GitHub Desktop.
Kill all Chrome tabs (except apps)
tabkill () {
ps ux | \
grep '[C]hrome Helper --type=renderer' | \
grep -vi "Canary" | \
grep -v extension-process | \
tr -s ' ' | \
cut -d ' ' -f2 | \
xargs kill
}
@nikcorg

nikcorg commented Jun 16, 2014

Copy link
Copy Markdown
Author

If you're like me, you have way too many tabs and windows open in your browser. Source or copy-paste this small function to your .bashrc and say tabkill in your console to free up some memory, while still not losing your tabs.

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