Skip to content

Instantly share code, notes, and snippets.

@nikcorg
Created June 14, 2014 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikcorg/2a24f6ec63a58ce3e41f to your computer and use it in GitHub Desktop.
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
Copy link
Author

nikcorg commented Jun 16, 2014

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