empty-trash

Empty the trash

Usage no npm install needed!

<script type="module">
  import emptyTrash from 'https://cdn.skypack.dev/empty-trash';
</script>

README

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

License

MIT © Sindre Sorhus