Kill all Chrome tabs to improve performance, decrease battery usage, and save memory

Overview

kill-tabs

Kill all Chrome tabs to improve performance, decrease battery usage, and save memory

Works on macOS, Linux, Windows.

I'm a tab-abuser and I use this once in a while to prevent Chrome from taking up all system resources.

When you run kill-tabs the Chrome tab processes are killed, which means they will no longer take up system resources, but they will still be in your Chrome window, just as crashed. When you want one back you just reload the tab.

CLI

$ npm install --global kill-tabs
$ kill-tabs --help

  Usage
    $ kill-tabs

  Options
    --no-chromium  Don't kill tabs in Chromium
    --no-chrome    Don't kill tabs in Chrome
    --no-brave     Don't kill tabs in Brave

API

$ npm install kill-tabs
const killTabs = require('kill-tabs');

(async () => {
	await killTabs();
	console.log('Killed tabs');
})();

Tip

You can use the Reload All Tabs Chrome extension to easily reload all the tabs.

Comments
  • Chromium support for Linux

    Chromium support for Linux

    Yes, about #1 issue. Is just a small change, as far as I know, the process is always called that. I have 2 pcs with linux and chromium and it works ok in both of them.

    If the pc is executing chrome and chromium, it should kill the tabs of both browsers.

    opened by chris-l 20
  • Kills all extensions as well as tabs

    Kills all extensions as well as tabs

    Ubuntu running Chrome 51.0.2704.63 (64-bit) The past few days I've noticed this is killing all my extensions as well as tabs.

    image

    Haven't used kill-tabs for a week or two - so I presume this has happened with the most recent Chrome (stable) update.

    Curious if anyone else has experienced the same issue.

    bug help wanted 
    opened by DJTB 5
  • kill-tabs stopeed working with npm@3.4.1

    kill-tabs stopeed working with [email protected]

    I have no idea what else could I write here :/ I have just realized after few npm & node updates that kill-tabs stopped working. It simply does nothing, none of tabs get's killed, no error, no message gets shown.

    $ node --version
    v4.2.2
    
    $ npm --version
    3.4.1
    
    $ kill-tabs
    
    $
    

    I'm using Windows 8.1, and I have tried re-installing many times.

    opened by tomalec 3
  • Chromium and Chrome Canary support

    Chromium and Chrome Canary support

    I'm using Chromium 43.0.2357.134 (64-bit). You need more info for debugging?

    In the meantime, this line does the trick for me:

    ps ax|sed -n -e '/chromium.*--type=renderer/ {/--extension-process/ !{s/^\([0-9]*\).*/\1/p}}'|xargs kill
    
    enhancement help wanted 
    opened by chris-l 2
  • (node:46711) Warning: process.on(SIGPROF) is reserved while debugging

    (node:46711) Warning: process.on(SIGPROF) is reserved while debugging

    ❯ kill-tabs
    (node:46518) Warning: process.on(SIGPROF) is reserved while debugging
    
    ❯ kill-tabs --version
    2.1.0
    
    ❯ node -v
    v8.6.0
    
    ❯ node -v #also tested on
    v9.8.0
    

    High Sierra 10.13.3

    opened by fregante 1
  • Thank you for this extension!

    Thank you for this extension!

    image

    (feel free to use the image above as a screenshot; it's the result of killing ~100 tabs).

    BTW, tab titles are still preserved, and you can look up any closed tab with the Tabs extension.

    opened by dandv 1
  • the great suspender

    the great suspender

    This is not really an issue, just a mention.

    I have the same tendency to open a lot of tabs and in need of a solution to the resource hogging problem. Some time ago I have found this extension called The Great Suspender (github repo) and have been using it to great satisfaction.

    One particular advantage over kill-tabs is that you don't have to kill all tabs at once. The granularity provided by the toolbar button is to either kill the current tab or all the tabs in the current window.

    Hope it helps!

    opened by ear 1
  • Cannot get available browser processes on Windows

    Cannot get available browser processes on Windows

    It seems there is a bug at line 11 of windows.js script.

    The call from promisify(childProcess.exec) at line 9 will return an object with the following properties: stderr, stdout, error.

    To be able succesffully call execall we need to access the stdout value.

    I'm pushing a fix in a few minutes. I will also be a good idea to check for stderr and report accordingly.

    opened by GeorgeGkas 0
  • Add MS Edge to process list

    Add MS Edge to process list

    I'm also a tab-abuser, but I prefer Edge. This PR adds Edge to the process list, the options and the README.

    This is one of my first OSS PRs, so please let me know if I did anything wrong!

    opened by RickDT 0
  • Update macOS process name for Brave Browser

    Update macOS process name for Brave Browser

    Hi @sindresorhus

    First, thanks for this module! I use it almost daily both via cli as well as macOS shortcuts to help with memory/battery management.

    I noticed that this wasn't killing tabs in Brave Browser. Did a bit of digging and it looks like at some point the process name was updated to 'Brave Browser Helper' on macOS. Unfortunately I don't have access to any other OS at the moment, so wasn't able to check if this issue is also present elsewhere.

    Thanks 👋

    opened by rmorrin 0
  • option except

    option except

    type idea

    issue I need many tabs opened and use only time to time - meanwhile they decreace performance - so I want kill just them, and my important still have active

    solution create command-line option "except" • except-domain -- eg $ kill-tabs --except-domain google.com • except-title -- eg $ kill-tabs --except-title google

    enhancement help wanted 
    opened by bgbruno 2
  • Chrome Canary support

    Chrome Canary support

    Figure out what the process name for tabs is on OS X, Linux and Windows and implement it here: https://github.com/sindresorhus/kill-tabs/commit/cb627bc2e9ca6bf236b12b85a81ed5dee266c2c9#diff-168726dbe96b3ce427e7fedce31bb0bcR5 and here https://github.com/sindresorhus/kill-tabs/commit/cb627bc2e9ca6bf236b12b85a81ed5dee266c2c9#diff-168726dbe96b3ce427e7fedce31bb0bcR30

    enhancement help wanted 
    opened by sindresorhus 0
Releases(v4.1.1)
  • v4.1.1(Apr 24, 2022)

    • Fix handling of all supported browsers on Windows (#25) ab696ea
    • Fix getting available browser processes on Windows (#23) c69d2ce

    https://github.com/sindresorhus/kill-tabs/compare/v4.1.0...v4.1.1

    Source code(tar.gz)
    Source code(zip)
  • v4.1.0(Apr 19, 2022)

  • v4.0.1(Apr 10, 2022)

  • v4.0.0(Oct 17, 2021)

  • v3.1.1(Jan 12, 2020)

  • v3.1.0(Oct 5, 2019)

Owner
Sindre Sorhus
Full-Time Open-Sourcerer. Wants more empathy & kindness in open source. Focuses on Swift & JavaScript. Makes macOS apps, CLI tools, npm packages. Likes unicorns
Sindre Sorhus
Close chrome tabs from command-line (macOS only)

Close-tab Read all tabs from an activated window of the chrome, open with vi prompt, you can close tabs by deleting lines. Istallation npm install -g

Karl Saehun Chung 8 Jun 18, 2022
DataENV is a cli tool that allows you to save data temporarily using your terminal.

DataEnv CLI Instllation npm install -g dataenv Usage Table of Contents LocalStorage npx dataenv save Parameters npx dataenv show Parameters npx dataen

PGamerX 2 Feb 5, 2022
Google Chrome extension which randomly generates a customisable 3D bamboo forest in your new tab

Bamboo-New-Tab bamboo-new-tab-demo.mp4 bamboo-new-tab-options-demo.mp4 Try it out Hosted version: https://conwayjw97.github.io/Bamboo-New-Tab/ To run

James 15 Nov 16, 2021
An extension geared towards Spotify users with larger libraries; view all your playlists that contain a specific song with the click of a button. Designed for Spicetify (https://github.com/khanhas/spicetify-cli)

ViewPlaylistsWithSong An extension developed for Spicetify that allows you to view all the playlists in your library that contain a certain song. Idea

null 21 Dec 13, 2022
Started pack for working with the new GameTest Framework API. Usable in windows, and mobile in worlds and realms!

GameTest FrameWork GameTest FrameWork is a new feature in Minecraft Bedrock Edition. This gives you the ability to script! In this example I will be u

null 40 Dec 24, 2022
A CLI to add and remove local development environments and create HTTPS certificates for them.

A CLI used to create a local https dev environment with the green lock. Setup takes less than 5 minutes and all of your projects will be running locally over HTTPS with custom domain names in no time!

Entrostat (Pty) Ltd 5 Sep 19, 2022
Find and fix problems in your JavaScript code.

ESLint Website | Configuring | Rules | Contributing | Reporting Bugs | Code of Conduct | Twitter | Mailing List | Chat Room ESLint is a tool for ident

ESLint 22k Jan 8, 2023
Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!

Ignite - the hottest React Native boilerplate Battle-tested React Native boilerplate The culmination of five years of constant React Native developmen

Infinite Red, Inc. 14.7k Dec 29, 2022
Test your internet connection speed and ping using speedtest.net from the CLI

speed-test Test your internet connection speed and ping using speedtest.net from the CLI Install Ensure you have Node.js version 8+ installed. Then ru

Sindre Sorhus 3.8k Jan 7, 2023
Detect copy-pasted and structurally similar code

Detect copy-pasted and structurally similar JavaScript code. Requires Node.js 6.0+, and supports ES6, JSX as well as Flow. Note: the project has been

Daniel St. Jules 3.5k Dec 26, 2022
Move files and directories to the trash

Move files and folders to the trash Works on macOS (10.12+), Linux, and Windows (8+). Note: The Linux implementation is not very good and not maintain

Sindre Sorhus 2.4k Dec 29, 2022
Pipeable javascript. Quickly filter, map, and reduce from the terminal

Pipeable JavaScript - another utility like sed/awk/wc... but with JS! Quickly filter, map and reduce from the command line. Features a streaming API.

Daniel St. Jules 410 Dec 10, 2022
📜 Create mutable log lines into the terminal, and give life to your logs!

Because Logging can be pretty and fun Installation $ npm install draftlog What it does It allows you to re-write a line of your log after being writt

Ivan Seidel 1.2k Dec 31, 2022
HMSC (How Much Stuffs CLI) analyst for your files and folders

HMSC ?? About HMSC (How Much Stuffs CLI) analyst for your files and folders ?? Screenshot ?? Requirements Node.js NPM ?? Installation $ npm i -g hmsc

Abdullah Veliyev 26 Jan 10, 2022
Add a hungry turtle to your terminal and feed it every time you mistype 'npm' as 'nom'

Nom Does this ever happen to you? You happily code away on a project, navigating the command line like a pro, testing, error logging, installing packa

Meike Hankewicz 5 Apr 26, 2022
replacement for comma.ai backend and useradmin dashboard. comes bundled with a modified cabana instance for seamless drive reviewing.

retropilot-server Replacement for comma.ai backend and useradmin dashboard. Bundled with a modified version of comma's cabana to allow viewing & analy

Florian Brede 39 Dec 4, 2022
Tasks Management CLI application with Nodejs, Mongodb, inquirer.js, and commander

Tasks CLI Tasks CLI is a program to manage your tasks in a database using terminal or console. This is a sample project for beginners Requirements Nod

Fazt Web 9 Nov 17, 2022
A simple CLI tool to create and manage xhelpers-api projects

A simple CLI tool to create and manage xhelpers-api projects

null 2 Feb 25, 2022