Skip to content

Instantly share code, notes, and snippets.

@Nav-Appaiya
Created December 26, 2021 22:26
Show Gist options
  • Select an option

  • Save Nav-Appaiya/79e7b35bdff833876611eb6bbe7dc709 to your computer and use it in GitHub Desktop.

Select an option

Save Nav-Appaiya/79e7b35bdff833876611eb6bbe7dc709 to your computer and use it in GitHub Desktop.
Cannot rm because generated/code is not empty magento 2 issue
this is because of permission issues with the generated/code folder, so try this
sudo find var/ generated/ vendor/ pub/static/ pub/media/ app/etc/ -type f -exec chmod g+w {} \;
sudo find var/ generated/ vendor/ pub/static/ pub/media/ app/etc/ -type d -exec chmod g+ws {} \;
Also if your generated/ folder is getting populated once you removed everything, while shop is in maintance mode,
this could have something to do with your cron job which is regenerating those files. Disable cronjobs first!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment