Formatting littlefs from platformio?

I am using littlefs to log some stuff.
Now i would like to be able to delete those logs without having to call Littlefs.format() from within the code, because i want to avoid having to upload a new firmware every time i want to clear my files (and then re-uploading the old firmware…)
Is there a possibility of doing so?

LittleFS.format() will only format the data partition, not the entire firmware.
A new upload is therefore not necssary.

If you have other data files in your littlefs partition which must be kept, I would use another data partition just for the log files.

You can delete files or folders from code.
You can measure the log file sizes or do a serial command check and than delete the files on the paths you use for logs.

I don’t know which framework you used for code so I can’t post examples from file delete.

From the IDE you can not delete specific files in your file system.