Like _.pull, but accepts an array of values to remove. Uses SameValueZero equality. Returns the same array (mutated). Part of Lodash 4.x Array (since 4.0.0).
Warning: Unlike _.difference, this method mutatesarray. Prefer _.pull for a few separate arguments; use pullAll when the ban list is already an array.
Syntax
Call _.pullAll on an array. Start with this line.
Lodash
_.pullAll(array, values)
Call
What it does
_.pullAll(array, values)
Primary signature.
_.pullAll(array)
Call with an array argument.
Prefer import pullAll from "lodash/pullAll" when you want a smaller bundle.
Library declarations
Lodash
_.pullAll(array, values)
Parameters
Parameter
Description
array
Required. Array to mutate
values
Required. Array of values to remove
Return Value
Return Value
Description
*
Same array reference
Lodash Examples
Example 1 — Official: Pull an Array of Values
Remove every "a" and "c" listed in a ban array.
Lodash
var array = ["a", "b", "c", "a", "b", "c"];
_.pullAll(array, ["a", "c"]);
// → ["b", "b"]
// array is also ["b", "b"]
SameValueZero. Lodash still treats both NaNs as matches.
Result. Both NaN slots are removed.
Also.+0 and -0 count as equal for removal.
Example 5 — pullAll vs pull
Same result — different argument shape.
Lodash
var a = ["a", "b", "c", "a"];
var b = ["a", "b", "c", "a"];
var ban = ["a", "c"];
_.pullAll(a, ban); // → ["b"]
_.pull(b, "a", "c"); // → ["b"]
// Prefer pullAll when ban is already an array
pull. Needs each value as its own argument (or a spread).
Choose. Config lists → pullAll; a few literals → pull.
Compatibility
Browser & Runtime Support
_.pullAll is a Lodash 4.x Array helper (since 4.0.0). It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash.
✓ Stable · Lodash 4.x
_.pullAll()
Available in [email protected] full builds and the lodash/pullAll modular import. There is no single native twin — closest patterns are a mutating filter loop or arr.filter / _.difference for a new array.
100%With Lodash 4.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.pullAllLodash 4.x+
Bottom line: Safe for production once Lodash is loaded. Prefer import pullAll from "lodash/pullAll" for smaller bundles. Remember: this helper mutates — pair with difference when you need immutability.
Frequently Asked Questions
_.pullAll(array, values) removes every occurrence of each value listed in the values array from array in place, using SameValueZero equality. It returns the same array reference.
Yes. Unlike _.difference, pullAll changes the array you pass in. Clone first (for example with slice) if you need to keep the old contents.
pull takes individual values as separate arguments. pullAll takes one array argument listing every value to remove — ideal when the ban list is already an array.
_.difference returns a new array and leaves the source alone. _.pullAll mutates the source and returns that same array.
No. Listing "a" twice does not change the result — each distinct value is still removed everywhere it appears.
Use import pullAll from "lodash/pullAll" or require("lodash/pullAll") for tree-shaking friendly bundles. Full build: import _ from "lodash" then _.pullAll.