Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Alias to kill all the tabs in Chrome to free up memory #236

Closed
wants to merge 1 commit into from

3 participants

@sindresorhus

Useful when you have a lot of tabs open (which I always do), but you don't want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

@sindresorhus sindresorhus Alias to kill all the tabs in Chrome to free up memory
Useful when you have a lot of tabs open (which I always do), but you don't want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.
2b4580a
@mathiasbynens

Holy shit. This is the greatest thing ever.

@mathiasbynens mathiasbynens closed this pull request from a commit
@sindresorhus sindresorhus .aliases: Add `chromekill` to kill all Chrome tabs to free up memory
Useful when you have a lot of tabs open (which I always do), but you don’t want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

Closes #236.
bd9429a
@mathiasbynens

Thanks so much!

@sindresorhus sindresorhus deleted the branch
@axelav axelav referenced this pull request from a commit in axelav/dotfiles
@sindresorhus sindresorhus .aliases: Add `chromekill` to kill all Chrome tabs to free up memory
Useful when you have a lot of tabs open (which I always do), but you don’t want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

Closes #236.

Conflicts:
	.aliases
01c9c7f
@hkdobrev

This stopped working for me on OS X Mavericks :(

@hkdobrev

OK, after restarting Chrome it is working, but not for pinned tabs. Perhaps something to do with the grep and other string matching.

@mathiasbynens

Works fine for me on OS X 10.9 using Chrome Canary v32.0.1678.0, even for pinned tabs.

@hkdobrev

OK, finally got it. When I start an app with "Open as pinned tab option" it won't die. But if I just open a regular tab with the same address and then pin it, it is killed.

BTW I am on the same Chrome version, dev channel.

@desimone desimone referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@seandw seandw referenced this pull request from a commit
@sindresorhus sindresorhus .aliases: Add `chromekill` to kill all Chrome tabs to free up memory
Useful when you have a lot of tabs open (which I always do), but you don’t want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

Closes #236.
8ec7b2f
@mrkd mrkd referenced this pull request from a commit in mrkd/dotfiles
@sindresorhus sindresorhus .aliases: Add `chromekill` to kill all Chrome tabs to free up memory
Useful when you have a lot of tabs open (which I always do), but you don’t want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

Closes #236.
73d88f6
@MarcelloDiSimone MarcelloDiSimone referenced this pull request from a commit
@sindresorhus sindresorhus .aliases: Add `chromekill` to kill all Chrome tabs to free up memory
Useful when you have a lot of tabs open (which I always do), but you don’t want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

Closes #236.
b06eeca
@thorsten thorsten referenced this pull request from a commit in thorsten/dotfiles
@sindresorhus sindresorhus .aliases: Add `chromekill` to kill all Chrome tabs to free up memory
Useful when you have a lot of tabs open (which I always do), but you don’t want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

Closes #236.
1b1174c
@dmcass dmcass referenced this pull request from a commit in dmcass/windows-dotfiles
@sindresorhus sindresorhus .aliases: Add `chromekill` to kill all Chrome tabs to free up memory
Useful when you have a lot of tabs open (which I always do), but you don’t want to close them.

Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.

Closes #236.
660235f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 27, 2013
  1. @sindresorhus

    Alias to kill all the tabs in Chrome to free up memory

    sindresorhus authored
    Useful when you have a lot of tabs open (which I always do), but you don't want to close them.
    
    Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 .aliases
View
4 .aliases
@@ -139,3 +139,7 @@ command -v grunt > /dev/null && alias grunt="grunt --stack"
alias stfu="osascript -e 'set volume output muted true'"
alias pumpitup="osascript -e 'set volume 7'"
alias hax="growlnotify -a 'Activity Monitor' 'System error' -m 'WTF R U DOIN'"
+
+# Kill all the tabs in Chrome to free up memory
+# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
+alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
Something went wrong with that request. Please try again.