As mentioned in an other topic, I managed to delete file(s) from flash, by following those steps (in case somebody faces the same problem):
- Update the firmware...It seems like uos.remove method was not working properly in some older version of the firmware or something...
- List files with the respectful method
(meaning that you have to import uos and then call uos.listdir())
- The last file showed by listdir is the one to be firslty removed (uos.remove("filename.py")
In case you want to delete more files, you have to do it sequentially. If you want to only delete the (i.e) second to last file, then you can NOT apply the uos.remove method, because doing so seems to work but in reality the file still occupies the same size in the flash memory. Only, solution is to delete all files until the one you wanted in the first place!
Thanks for your help