The bookmarks.removeTree() method recursively removes a bookmark folder and all of its contents.

If the bookmark item could not be found, runtime.lastError is set, and you can check for it in the callback.


  id,                 // string
  function() {...}    // optional function

This API is also available as browser.bookmarks.removeTree() in a version that returns a promise.


A string specifying the ID of the folder node to be deleted along with its descendants.
callback Optional
A function to call once the nodes have been removed. No parameters are passed to this function.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes No 47.0 No 33


This example locates a bookmark folder named "MDN" and deletes it along with all of its contents.

function onRemoved() {
  if (chrome.runtime.lastError) {
  } else {
    console.log("bookmark item removed!");

function removeMDN(searchResults) {
  if (searchResults.length) {
    chrome.bookmarks.removeTree(searchResults[0].id, onRemoved);
}{ title: "MDN" }, removeMDN);


This API is based on Chromium's chrome.bookmarks API. This documentation is derived from bookmarks.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: Makyen, wbamberg, Sheppy
 Last updated by: Makyen,