Search Unity

Question How to delete the contents of a CCD bucket using unity CLI?

Discussion in 'Unity Gaming Services General Discussion' started by programacion-6, Nov 10, 2022.

  1. programacion-6

    programacion-6

    Joined:
    Mar 25, 2022
    Posts:
    10
    The documentation states the existence of the command delete to remove an entry from a bucket.

    https://docs.unity.com/ccd/UnityCCDCLI.html

    But it assumes knowing the name of the entry. And we may want to automate removing all entries of a bucket.

    How we delete with a CCD CLI command all the entries of a bucket?

    For experienced shell users, that may be listing the entries with the entries list command and then iterating over the result to delete every entry from the bucket.

    If that's the case, how would that shell command be?
     
    Last edited: Nov 10, 2022
  2. llunity3d

    llunity3d

    Unity Technologies

    Joined:
    Aug 23, 2021
    Posts:
    24
    Hi @programacion-6 ,

    If you no longer need to bucket, you could simply delete the bucket using:
    ucd buckets delete [bucket_id]


    Or if you would like to keep the bucket but get rid of all the entries in it, you could sync it with an empty folder with:
    ucd entries sync [path_to_empty_folder] --delete


    The --delete flag allow you to delete the entries that do not exist locally.

    Hope this helps
     
    SebT_Unity and programacion-6 like this.
  3. programacion-6

    programacion-6

    Joined:
    Mar 25, 2022
    Posts:
    10
    Perfect :) The --delete flag was exactly what I was looking for.

    Although I don't recall seeing that flag documented here:
    https://docs.unity.com/ccd/UnityCCDCLI.html

    Thanks for the answer
     
    SebT_Unity likes this.