Skip to content
Empty the trash
JavaScript TypeScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.editorconfig
.gitattributes
.gitignore
.npmrc
.travis.yml
index.d.ts
index.js
index.test-d.ts
license
package.json
readme.md
test.js

readme.md

empty-trash Build Status

Empty the trash

Works on macOS, Linux, and Windows.

Install

$ npm install empty-trash

Usage

const emptyTrash = require('empty-trash');

(async () => {
	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

You can’t perform that action at this time.