Skip to content

diessica/slack-delete-files

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

slack-delete-files npm version Build Status

Mass delete files from Slack using JavaScript.

Because Slack comes with limited file storage and there's no way to bulk delete files in order to free up space. (Source)

Install

⚠️ This app depends on Node.js 8+.

$ npm install -g slack-delete-files

Instead of polluting global installs, you can also run the Node binary directly:

$ npx slack-delete-files

Usage

$ slack-delete-files

Options:
  --help       Show help                                               [boolean]
  --version    Show version number                                     [boolean]
  --token, -t  Slack token                                   [string] [required]
  --pinned     Include pinned files                   [boolean] [default: false]
  --max        Amount of files to fetch                 [number] [default: 1000]
  --age        Delete only files older than the specified number of days
                                                          [number] [default: 30]

A Slack API token (--token) is required! Grab yours in Slack API docs.

Example

Below, we are deleting files older than 60 days, including pinned files.

slack-delete-files --age=60 --pinned --token=xoxp-34874354-4059649056
Limitations
  • Does NOT delete files sent in people's private channels.

License

MIT

About

💣 mass delete files from Slack using JavaScript.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published