Alternatives to purge command
The problem is with clearing inactive memory in the first place, regardless of which command is used to do it.



Indeed, using purge is "not a good idea" but the problem is due to what the end result of the command is rather than how the command does it or other specific problem due to the command.

Running purge attempts to clear inactive memory. An 'alternative' command would not be any better than running purge, providing it does the same thing.

This excellent answer explains the reasoning behind inactive memory in more detail:


Isn't Inactive memory a waste of resources?