What files are safe to delete?
There seems to be a lot of files that are duplicates for various reasons, and I was hoping there might already be some kind of existing post or article that shows everything that can safely be removed. I want to get rid of all the excess stuff so hopefully I can do that without deleting little bits at a time and testing over and over again to make sure I didn't just break anything.
Thank you
Hi there,
I don't fully understand the question I am afraid. Which files exactly are you referring to? To provide more specific advice, I need additional information about the nature of these files that you are referring to.
Regardless of the specifics, I want to stress the importance of having a backup of your data before proceeding with any file deletion. This is a precautionary measure to ensure you can restore your data if something goes wrong or if you accidentally delete important files.
Best,
Bobby
Oh yes of course I've made back ups, but I just didn't want to have to re-trace my steps and try to figure out which file broke something.
But to answer your question, I deleted the entire docs folder because obviously that's not critical for anything to. And there have been quite a few files that when I searched for them in my editor, I saw another file with the same name in a different folder and it seemed to be in a place that wasn't important. like maybe for test or something, so I deleted all of those as I noticed and thankfully nothing broke.
There was one other type of file that kept clogging up my search results when I would search for some common things, and I cannot remember what the type of file was but it was clearly not doing anything I needed, and it had a bunch of common stuff that was taking up a ton of space in my search results and I knew I would never need the files, so I deleted them as well. I'll do a file compare later with the fresh git download and see if I can show you what I'm talking about.
The point was that I have deleted quite a lot of files that seemed to just be taking up space and causing annoyance in the search results, so I was hoping there was some more stuff I could clear out. But I might just have to do it manually, which is fine.
Hello,
Thank you for the clarification!
This would be strictly individual, depending on what functionality you need.
I could suggest:
- Run the
php artisan route:list | grep -v admin
command - Then review the files that you need and don't need
- Based on those routes, check the Controllers for them and remove any methods that you do not need
- Based on the Controllers, remove the correlated views
As a side note, you should not delete anything from the vendor
folder.
Also, note that just because a file has the same name, this does not mean that the logic inside the file is the same, it is best to review what the individual file does and then take action based on that.
Hope that this helps!
Best,
Bobby
No problem at all! Happy to help! And good luck with your project!