For most Composer-installed libraries, it won’t be. But I can imagine that there may be, say, a validation library here that has a set of “test” functions/classes/files that will break if you run this find expression on it.
That does require properly informing the user about what’s going to be deleted before actually deleting it. And for the user to properly understand the consequences.
I will guarantee you that if you offer a function to “delete unnecessary files”, a lot of people will just think “hey, that’s useful, I just click this link, and then click next, next, next, next and then my inode usage will go down, and it’s just unnecessary files and the hosting wouldn’t break my site, wouldn’t it?”.
If you offer this functionality, I know for certain that many people will not pay attention to what’s being deleted, will delete files that are very much still necessary, and then get angry at us for breaking their site.
And “just inform them properly” doesn’t work. Experience has shown time and time again that many people simply don’t read and just go by their own hopes and assumptions in spite of all the information you shove in their face to contradict it.
Give people a gun and they will shoot themselves in the foot with it. And a tool that starts deleting files from their account is a very big gun.
My last words.
It’s your server, it’s your decision to add/work on it/abandon it. Mine is just an idea.
I agree it has many minus sides, but if you like to implement it to panel - I’ll do my best to help. @Admin
If I’m going to be building it, most of this should be done through FTP, so no need to worry about IO limits.
I do have some ideas on how it could work in a way that’s probably not completely stupid. But it’s still a complicated beast with a lot of moving parts for something that I think is not that useful for that many people. So don’t get your hopes up.
Is there any analysis of which actions fill the most inodes ?
Was it experimenting with Softaculous in the sense that someone doesn’t know what he wants and then installs 5 forums and 10 scripts
and doesn’t wipe off the rest of it?
Or is it that someone tries 30 themes for WP and plugins, which then leaves a bunch of unnecessary files?
Or the third… that someone has file uploading and the like, so, of course, a lot of things accumulate?
I think that before creating such a program, you should collect at least 10 paths
which could be deleted so that it would make sense to invest time in it all
On the other hand, if you know 10+ paths where files can be freely deleted
then it’s better to report it to ifastnet and let them optimize their servers on a monthly basis rather than you doing it for them
Not that I know of. But from gut feeling of what I’ve seen from people asking about it, all the things you listed apply.
Eh, not necessarily. You can just make it so that it’s extensible, start with only a few paths and expand it as necessary. And figure out which common junk files are uploaded. Backups, cache directories and other temporary files are probably good candidates. Indiscriminately nuking every node_modules directory will also do wonders for the accounts that contain them.
Two reasons not to do that.
First of all: false positives can exist. If website software X has path Y that can be safely deleted, a different website may also have a path Y that does contain vital data and will break the website if deleted. And I don’t want to have to tell people “sorry that we broke your website by deleting critical files, we were trying to help you by reducing your inode usage”. That’s why such a tool should be triggered by hand, and tell beforehand what data is going to be deleted so the user can check it. Having rollback functionality is even better.
And second: if I put on my evil corporate hat, then helping people reduce their inode usage is bad for business, because it gives people less reason to upgrade to premium hosting, because they don’t need the higher inode limits as much.