How to delete all Slack files to manage disk space

Jugo Mobile
By
Jugo Mobile
Jugo Mobile is a platform dedicated to high-quality content in gaming, sports, and tech. Engage with high-quality content and connect with fellow enthusiasts and experts. Explore...
6 Min Read

Slack is the tool of choice for many companies and companies that collaborate remotely. It is a productivity powerhouse that encompasses chat, file sharing, project management tools, and a wide range of plugins that offer a lot of power to the application. What typically happens within a Slack group is a lot of files being shared with little version control and a lot of mess to clean up once the project is complete. If you’re cleaning up after such a project, here’s how to delete all your Slack files without deleting the workspace.

Slack saves everything. As long as your workspace is active, all your files, channels, chats, and everything you’ve shared will be preserved. You could archive or delete a workspace, but since it takes a bit of time to set up and break down, if you plan to get the team back together for another project, it may not be worth it. It’s much better to do a little cleaning to keep things tidy.

Slack’s main limitation is disk space. Once everything is saved, it will quickly consume 5 GB of space in even a modest project. To help manage space, you can delete files that are taking up too much. That’s what this tutorial is about.

Members and guests can be configured to delete files or permission can be denied by the workspace administrator. Either way, you can delete inpidual Slack files without any plugins, but to delete all Slack files within a workspace, you’ll need a script.

How to delete all Slack files to manage disk space

Delete files from Slack

The exact way to delete files from Slack depends entirely on the platform you are using. It differs slightly between desktop, Android and iOS, so I’ll show you all of them. You can delete a file that you personally added to a workspace or from a shared channel. Anyone can delete files you add, but only workspace owners or administrators can delete files from shared channels. The method is the same for both.

On the desk:

  1. Select the channel name at the top right of the screen.
    1712404842 219 How to delete all Slack files to manage disk space
  2. Under the About section, scroll down and select the file you want to delete.
    1712404842 725 How to delete all Slack files to manage disk space
  3. Click the three dot menu icon and select Delete file.
    1712404842 92 How to delete all Slack files to manage disk space
  4. Confirm with Yes, delete this file.
    1712404842 632 How to delete all Slack files to manage disk space

On Android:

  1. Select the file you want to delete from Slack.
    1712404843 577 How to delete all Slack files to manage disk space
  2. Select the three dot menu icon at the bottom right of the screen and select Delete.
    1712404843 754 How to delete all Slack files to manage disk space
  3. Select Delete again to confirm.
    1712404844 619 How to delete all Slack files to manage disk space

On iOS:

  1. Select Your files within Slack.
  2. Select a file to delete.
  3. Select the three dot menu icon at the bottom right of the screen.
  4. Select Delete and then Yes, delete file to confirm.

You can only select to delete one file at a time, regardless of which platform you use. If you only have a couple of files, this should be fine. If you have more, you will need to use a plugin or script.

1712404844 382 How to delete all Slack files to manage disk space

Delete all Slack files in bulk

To delete all Slack files in bulk, you will need to use a script. There are some good ones on GitHub that are free to use. They require Python to be installed on your computer in order to run them, but that’s easy to fix. The script I include below will delete all files that are older than 30 days. This helps save disk space while keeping the latest versions of files available to your computer.

  1. Download and install Python from here.
  2. Install the requests library in Python from here.
  3. Get yourself a Slack API Key.
  4. Create a file using Notepad or text editor and name it something meaningful. It must have the .py suffix to work in Python.
  5. Paste the following script into your .py file.
  6. Add your Slack API key where it says token=”. FOR EXAMPLE: token = ‘API KEY HERE’.
  7. Save the script and then run it.

The script text you need to paste:

import requests

import time

import json

token = ''

#Delete files older than this:

ts_to = int(time.time()) - 30 * 24 * 60 * 60


def list_files():

 params = {

 'token': token

 ,'ts_to': ts_to

 ,'count': 1000

 }

 uri = 'https://slack.com/api/files.list'

 response = requests.get(uri, params=params)

 return json.loads(response.text)['files']


def delete_files(file_ids):

 count = 0

 num_files = len(file_ids)

 for file_id in file_ids:

 count = count + 1

 params = {

 'token': token

 ,'file': file_id

 }

 uri = 'https://slack.com/api/files.delete'

 response = requests.get(uri, params=params)

 print count, "of", num_files, "-", file_id, json.loads(response.text)['ok']

files = list_files()

file_ids = [f['id'] for f in files]

delete_files(file_ids)

This script is not my work but was taken from GitHub. All credit should go to the author of the code.

Managing disk space is one of the main challenges when using Slack, and deleting old files is a good way to overcome that limitation. If you manage a team or workspace, you now know how to delete all Slack files to manage disk space!

Share This Article
Follow:
Jugo Mobile is a platform dedicated to high-quality content in gaming, sports, and tech. Engage with high-quality content and connect with fellow enthusiasts and experts. Explore the latest trends and innovations in our vibrant community. Join us and experience the future today!
Leave a Comment
Grow your brand and reach a larger audience. Advertise with us today and get noticed by thousands.
© 2025 Jugo Mobile. All Rights Reserved.