npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

empty-trash

4.0.0

@sindresorhus

npmHomeRepoSnykSocket
Downloads:51
$ npm install empty-trash
DailyWeeklyMonthlyYearly

empty-trash

Empty the trash

Works on macOS, Linux, and Windows.

Install

npm install empty-trash

Usage

import emptyTrash from 'empty-trash';

await emptyTrash();

Info

On macOS, AppleScript is used as it's the only way to do it without incurring permission issues.

On Linux, the XDG spec is followed.

On Windows, empty-recycle-bin is used.

Related

  • empty-trash-cli - CLI for this module
  • trash - Move files and folders to the trash