Open-source project
redleafnew/delitemwithatt avatar
redleafnew/delitemwithatt

Del Item With Attachment: a Zotero plugin that cleans up files as it deletes

Remove attachment(s) when delete the item(s) or collection in Zotero and JurisM.

660 stars15 forksTypeScriptAGPL-3.0

At a glance

What is it?
This Zotero and JurisM plugin adds a delete action that removes an item's linked attachments, snapshots or notes at the same time as the item itself, plus a language field setter and an attachment export. The warning in its documentation matters: deleted linked files do not go to the trash.
Who is it for?
Del Item With Attachment fits a Zotero user who accumulates large linked PDF archives and wants one action to remove an item and its files together, rather than deleting the record and leaving the files on disk. It does not fit anyone who relies on the Zotero trash to recover a mistaken deletion, because the linked files are removed directly.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Three features, and the first one is the destructive one

The plugin does three things according to its documentation. The first is removing linked attachments at the same time as the item or collection being deleted. The second is setting the language field of selected items to en-US or zh-CN depending on the language of the item title. The third is exporting attachments. The first is what the plugin is named for and the one people install it for. The second is a small quality-of-life feature that removes the need to set the language field by hand on imported items, since a wrong or missing language field affects citation output. The third is a convenience that lets you get the attachment files out of the library without going through the standard export dialog. The plugin is based on the zotero-plugin-template by windingwind, and the credits section thanks that team explicitly.

Installing an xpi into Zotero or JurisM

Installation is manual and specific to the add-on system of both applications. You download the xpi file from the project's releases page, then in Zotero or JurisM you use the Tools menu, Add-ons, and Install Add-on From File. The manifest records that release page link as the releasepage value, and the same manifest block carries the addonName of Del Item With Attachment, the addonID of [email protected], and an addonRef of delitemwithatt, which is the identifier the plugin registers itself under inside the application. The manifest also records an updaterdf pointing at an update.json file in the repository, so the plugin can check for its own updates. The licence is GNU General Public License version 3.0, and the manifest expresses it as AGPL-3.0-or-later. Note the default branch of the repository, which is a dependabot branch for the Node 20.1.0 type definitions, so a clone lands on a dependency bump branch rather than on a release branch.

The context menu gives you six different deletions

After installation, right-clicking an item shows a Delete Attachment entry, and if the item has attachments a set of submenus appears. There are six of them, and the distinction between them is the part to read carefully before clicking. Delete Attachment(s) and Item(s) is bound to Alt+I and removes the item together with its attachments. Delete All Attachment(s) only is Alt+A and keeps the item. Delete Snapshot(s) only is Alt+S. Delete Note(s) only is Alt+N. Empty Abstract(s) is Alt+Z, and Empty Extra(s) is Alt+X. The last two do not delete anything but clear the corresponding field on the item. The README's English text says four submenus, then lists six, and the Chinese section lists six, so the list of six is the accurate one. On a collection, right-clicking offers a single entry, Delete Collections with Attachments, which on confirmation deletes the collection and the items in it along with their attachments.

Snapshots count as attachments, and the trash does not apply

Two details decide how much damage an action can do. The first is that a snapshot is also regarded as an attachment, so the delete-attachment-only option will remove a saved web page snapshot along with the PDF if you have one. The second is the warning the documentation puts in bold twice, in both the Chinese and the English text. The linked files could not be restored, they will be removed directly, and you are told to back up before removing. This is not a Zotero trash item and it is not the operating system trash either, so an accidental confirmation loses the file permanently. The plugin does depend on a package named trash in the manifest, so there is some trash handling in the code, but the documented behaviour for linked files is direct removal. The difference between a linked file and a stored file also matters here, since a stored attachment lives inside the Zotero data directory and is a different object from a link to a PDF elsewhere on disk.

A Zotero plugin built on esbuild and a toolkit

The build setup tells you what kind of project this is. The manifest main points at src/index.ts, so the source is TypeScript, and the build scripts run a node script under cross-env with the environment set to development or production. There is a separate start script with flags for Zotero 6 and Zotero 7, which is the compatibility handling for the two application versions, and stop and restart scripts that pair with it. The release script uses release-it, and the .release-it.json file at the root configures it. The two runtime dependencies are zotero-plugin-toolkit, which provides the plugin scaffolding and the API bindings for the application, and the trash package. The dev dependencies include esbuild for bundling, zotero-types for the application API typings, compressing for packaging the xpi, replace-in-file for stamping build metadata into the addon files, and release-it for publishing. The repository layout shows the parts of a Zotero add-on: an addon directory, a src directory, typing, an update.json and update.rdf for the add-on manager, and an update-template pair that the build fills in.

Release cadence, and a test script that does nothing

The project is active. The release history shows v0.5.0 on 2026-08-10, v0.4.6 on 2026-07-26 and v0.4.5 on 2026-04-11, and the last push was on 2026-08-10, so the plugin is being maintained. The version in the package manifest is 0.1.06, which does not match the release tags, so the manifest version is a separate counter from the published release number and it is the release tags that matter for anyone installing. One thing to know is the test script, which is the default placeholder that prints an error and exits with status 1, so there is no automated test suite in the repository. For a plugin whose main action is irreversible file deletion, that is worth noting. The README does ask for contributions and says they are preferably through pull requests, and the repository has a .github directory for the issue and pull request templates.

Editorial conclusion

Del Item With Attachment fits a Zotero user who accumulates large linked PDF archives and wants one action to remove an item and its files together, rather than deleting the record and leaving the files on disk. It does not fit anyone who relies on the Zotero trash to recover a mistaken deletion, because the linked files are removed directly. Verify first that your library is backed up and that the deletion mode you choose matches what you intend, read the difference between the submenu entries before you confirm, and note that the plugin also has a language field setter that changes metadata on selected items, which is worth checking on a copy of a collection first.

Frequently asked questions

How do I install Del Item With Attachment in Zotero?

Download the xpi from the project's releases page, then in Zotero or JurisM go to Tools, Add-ons and Install Add-on From File. After installation a Delete Attachment entry appears when you right-click an item.

What do the submenu options in the plugin do?

They are Delete Attachment(s) and Item(s) with Alt+I, Delete All Attachment(s) only with Alt+A, Delete Snapshot(s) only with Alt+S, Delete Note(s) only with Alt+N, Empty Abstract(s) with Alt+Z and Empty Extra(s) with Alt+X. A snapshot counts as an attachment for the deletion options.

Can deleted attachments be recovered?

No. The documentation warns in bold that the linked files could not be restored and will be removed directly, and asks you to back up before removing. The item record goes through the normal deletion, but the linked files on disk are removed permanently.

What else does the plugin do besides deleting attachments?

It can set the language field of selected items to en-US or zh-CN based on the language of the item title, and it can export attachments. The plugin is based on the zotero-plugin-template by windingwind.

Official sources

  1. Issues
  2. License: AGPL-3.0
  3. README
  4. redleafnew/delitemwithatt on GitHub
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/redleafnew-delitemwithatt.svg)](https://hysenlabs.com/projects/redleafnew-delitemwithatt)

Was this useful?