Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out repository size?

Systemadmin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2017

We got a couple Projects, with quite a few repositories in some case, and there are also private repositories.

How can i find out the size of each?

(As to check if private ones are used reasonably and what projects are eating up my disc space.)

2 answers

2 accepted

4 votes
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2024

If you are using Bitbucket Cloud, you can use the Forge app described in this article:

- Access and Share Repository Size Data Across All Projects

The app adds a Workspace Settings Menu page with the size of all repositories in a workspace and a download option to export the information in a CSV file. The app also adds the size information in the repository overview for each user to see.

I'm showing how the app works in this YouTube video.

Hope this helps,
Caterina

 

4 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2017

In Bitbucket Cloud, a repository admin can see the size under "Repository Details" under Settings.

In Bitbucket Server too, you can view it under Settings > Repository Details after clicking on "Retrieve Size Details".

Tripline July 12, 2018

Retrieve Size Details, where is this?

Mary Slocum July 12, 2018

If you are in the Repository settings, make sure that you have selected the top/first item for Repository details. Then, you should see Approximate size with Retrieve size details. Just click on Retrieve size details.

Richard Cross
Contributor
December 7, 2018

Is it possible to get this information via a REST API call?

Like 7 people like this
Michael Windeisen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 9, 2020

Is ther still no possibility to get the repo size using the REST API?

Gustavo Segura
Contributor
May 6, 2020

I have a small python script that will get you this info here.

Like LQ likes this
seanaty
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 27, 2020

`size` is a property of the repository object on the API. Here is an example object from https://api.bitbucket.org/2.0/repositories/atlassian/bbql/?fields=-owner,-workspace,-links,-project

(Note that I've used field exclusion to remove some fields so it's easier to read).

The size is in bytes.

{
"scm": "git",
"website": "",
"has_wiki": false,
"uuid": "{937ead00-56c2-4ade-a39f-5ece4cad603a}",
"language": "python",
"fork_policy": "allow_forks",
"name": "bbql",
"created_on": "2015-12-24T01:38:39.423219+00:00",
"mainbranch": {
"type": "branch",
"name": "master"
},
"full_name": "atlassian/bbql",
"has_issues": true,
"updated_on": "2020-05-15T01:15:06.344215+00:00",
"size": 1911650,
"type": "repository",
"slug": "bbql",
"is_private": false,
"description": "API query language for Django as used on bitbucket.org."
}
Like LQ likes this
LQ November 18, 2020

Is there a table or query we can check against the database instead? Just trying to verify if any of our repos are over 2GB for the Cloud migration.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events