What is the preferred way to clear the temp folder?
I’ve seen that in my application, this folder sometimes becomes huge, especially the composer folder inside the temp folder.
Here you can see that the temp folder is the largest folder inside the storage folder:
Going further you can see that the composer folder is the largest inside the temp folder:
It contains all kinds of caches from a while ago:
Can we safely just delete them? I understand that the contents of the temp folder should be cleared by the scripts that populate them in the first place, but in reality we see that this doesn’t always happen.
Can we safely delete everything in the temp folder or should we be mindful of keeping the folder structure inside?
Can we run a command to clear this maybe?
Please note that the following commands leave these folders untouched:
php artisan cache:clear
php artisan view:clear
php artisan config:cache