context
BitBucket Cloud API provides a way to obtain all the repositories https://api.bitbucket.org/2.0/repositories/{{team_id}}?pagelen=100.
Using this API, it is possible to obtain all the size to find out:
- large repositories
- calculate how many storage has been consumed.
- sort by sizes
idead for cli
$ bitbucklet repos list-by-size --threshold=50MB --sort=desc
$ bitbucklet repos storage-usage