Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I delete multiple files in artifactory

Tags:

artifactory

I wanted to delete multiple files from Artifactory using their CLI, but it's not letting me.

./jfrog rt del "barbarian/CSS/2.12.8-1+gccb456e/PR-495/0/package/";"barbarian/BS/2.12.8-1+gccb456e/PR-495/0/package/" --quiet

I am getting no such file or directory

If I do these individually, it works so the path is correct. It is just not allowing me to delete them simultaneously.

like image 579
guylifestyle Avatar asked Dec 22 '25 15:12

guylifestyle


1 Answers

You should probably use 1 of 2 options:

Set wildcards in your Delete path, and if needed in your --exclude-patterns to get to your desired list of artifacts you'd like to delete

or

Use a file spec (--spec) with your delete command, and specify the list of patterns you'd like to delete, for example, something like:

{
"files": [
 {
    "pattern": "barbarian/CSS/2.12.8-1+gccb456e/PR-495/0/package/"
 },
 {
    "pattern": "barbarian/BS/2.12.8-1+gccb456e/PR-495/0/package/"
 }
]}

you can find more regarding the different options in the CLI's delete command here

like image 168
Ortsigat Avatar answered Dec 24 '25 11:12

Ortsigat