This FEP defines a RemoveAll activity for batch-removing items from an ActivityPub collection. While the ActivityPub specification defines Remove for removing items from a collection, it requires the client to know the identity of every item to remove. RemoveAll fills this gap. It supports an optional FEP-34c1 filter to selectively remove items matching specific criteria (e.g. by type, by date, or by actor). Without a filter, all items are removed. RemoveAll is a generic collection operation — it can be used with any collection type, not just inboxes or notification collections.
ActivityPub’s Remove activity requires the client to know the identity of every object to remove from a target collection. For collections that can grow large, clients need a way to batch-remove items without sending individual Remove activities for each item. Common use cases include:
Without a batch operation, a client must first fetch all items, then send individual Remove activities — which is both slow and prone to race conditions.
RemoveAll ActivityRemoveAll is a new activity type that removes multiple items from a target collection.
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/db70"
],
"type": "RemoveAll",
"actor": "https://example.com/actors/bob",
"target": "https://example.com/actors/bob/notifications"
}
| Property | Type | Required | Description |
|---|---|---|---|
type |
String | MUST | RemoveAll |
actor |
IRI | MUST | The actor performing the operation |
target |
IRI | MUST | The collection to remove items from |
filter |
FilterRequest | MAY | A FEP-34c1 filter to select which items to remove |
Without a filter, the server MUST remove all items from the target collection.
When a filter property is present, only items matching the filter are removed. The filter uses the FEP-34c1 FilterRequest format with TREE relations.
Remove all items matching a specific property value:
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/db70",
"https://w3id.org/fep/34c1",
"https://w3id.org/tree"
],
"type": "RemoveAll",
"actor": "https://example.com/actors/bob",
"target": "https://example.com/actors/bob/some-collection",
"filter": {
"type": "FilterRequest",
"relation": [
{
"type": "EqualToRelation",
"path": { "@id": "rdf:type" },
"value": { "@id": "as:Create" }
}
]
}
}
Remove all items older than a given date:
{
"type": "RemoveAll",
"actor": "https://example.com/actors/bob",
"target": "https://example.com/actors/bob/some-collection",
"filter": {
"type": "FilterRequest",
"relation": [
{
"type": "LessThanRelation",
"path": { "@id": "as:published" },
"value": { "@value": "2026-02-17T00:00:00Z", "@type": "xsd:dateTime" }
}
]
}
}
Combine multiple filter criteria (AND):
{
"type": "RemoveAll",
"actor": "https://example.com/actors/bob",
"target": "https://example.com/actors/bob/some-collection",
"filter": {
"type": "FilterRequest",
"relation": [
{
"type": "EqualToRelation",
"path": { "@id": "rdf:type" },
"value": { "@id": "as:Create" }
},
{
"type": "LessThanRelation",
"path": { "@id": "as:published" },
"value": { "@value": "2026-02-17T00:00:00Z", "@type": "xsd:dateTime" }
}
]
}
}
Multiple relation entries are combined with AND — all criteria must match for an item to be removed.
actor is authorized to modify the target collection404 Not Found401 UnauthorizedThe server SHOULD respond with 200 OK and the number of removed items:
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Removed 12 items from the collection"
}
RemoveAll without a filter removes all items from a collection. Servers SHOULD ensure that the actor is authorized for the target collection.RemoveAll operations.A conforming server MUST:
RemoveAll activities targeting a collection owned by the actorfilter is presentfilter is presentA conforming server SHOULD:
FilterRequest in the filter propertyCC0 1.0 Universal (CC0 1.0) Public Domain Dedication
To the extent possible under law, the authors of this Fediverse Enhancement Proposal have waived all copyright and related or neighboring rights to this work.