Can we delete 'setup' directory after successful magento 2 installation ?
What are the directories/files we can delete after magento 2 successful installation, especially E:\xampp\htdocs\magento2.1\setup\src\Magento\Setup\Test directory ?
In short, you should not remove the setup directory, without it bin/magento
will not work.
As far as what you can safely remove... not a lot. The installer cleans up any unnecessary files once the Magento installation is complete.
The only files i can think of are the ones ending in .sample
(they are used when you want to create a new version of the file) which you can easily find on the internet if needed.
I dont have enough reputation to add a comment.
Regarding Radosav Answer, Please do not delete .sample files . Deleting those files will results in error when having cron jobs set.
This happened to me when I deleted the .htaccess.sample file from the root directory of magento 2 website. I got the following error:
update-cron.ERROR: Cron readiness check failure! Found non-writable paths: .htaccess.sample.