Changes in Bitbucket free storage limit

Bitbucket has announced that starting April 28, 2025, free workspaces will have a total storage limit of 1 GB. If your workspace exceeds this limit and you do not reduce its size or upgrade to a paid plan, your workspace and its content will be put into read-only mode on that date. ​

To check your current storage usage, navigate to Workspace settingsPlan detailsWorkspace storage used.

If you need additional storage, you can upgrade to one of Bitbucket’s paid plans:

  • Standard Plan: $3.30 per user/month, includes 5 GB of storage.
  • Premium Plan: $6.60 per user/month, includes 10 GB of storage. ​

Exceeding the included storage in these plans will incur additional charges of $10 per month for every additional 100 GB of storage used.

Please note that inactive free repositories (those not accessed or pushed to for more than 3 months) may be archived before April 28, 2025.

For more information on these changes and to explore the available plans, you can visit Bitbucket’s pricing page.

If, like me, you are looking for a way to check the size of multiple repositories, you can use a simple script :

#!/bin/bash

# Set your Bitbucket credentials and username
BITBUCKET_USER="myBibucketUsername"
BITBUCKET_APP_PASSWORD="myPassword"
BITBUCKET_WORKSPACE="myworkspaceName"

API_URL="https://api.bitbucket.org/2.0/repositories/$BITBUCKET_WORKSPACE"
PAGE=1
ALL_REPOS="[]"

# Loop through all pages (max 100 repositories per page)
while true; do
    # Fetch repositories on the current page
    RESPONSE=$(curl -s -u $BITBUCKET_USER:$BITBUCKET_APP_PASSWORD "$API_URL?fields=values.full_name,values.size&pagelen=100&page=$PAGE")
    
    # Check if the response contains repositories
    REPO_COUNT=$(echo "$RESPONSE" | jq '.values | length')
    
    if [ "$REPO_COUNT" -eq 0 ]; then
        break  # No more repositories, exit the loop
    fi
    
    # Extract the 'values' array and add repositories from this page to the result list
    REPOS=$(echo "$RESPONSE" | jq '.values')
    ALL_REPOS=$(echo "$ALL_REPOS" | jq -s 'add + $REPOS' --argjson REPOS "$REPOS")
    
    # Increment the page number to get the next page of results
    PAGE=$((PAGE + 1))
done

# Convert size to MB (1 MB = 1048576 bytes), sort by size in descending order, and export to a file
echo "$ALL_REPOS" | jq '. | sort_by(.size) | reverse | .[] | {name: .full_name, size: (.size / 1048576 | .)}' > repositories_size_in_mb.json

echo "Repositories' size data (in MB) has been exported to repositories_size_in_mb.json"

you will get a json file with something like this:

{
  "name": "myworkspaceName/project_A",
  "size": 223.98414039611816
}
{
  "name": "myworkspaceName/project_B",
  "size": 119.81868553161621
}
{
  "name": "myworkspaceName/project_C",
  "size": 71.01672458648682
}
{
  "name": "myworkspaceName/project_D",
  "size": 68.32918167114258
}

To run your script, you can just save the script to a file: get_repos_size.sh and run:

./get_repos_size.sh

Leave a Reply

Your email address will not be published. Required fields are marked *