Final answer:
To drive away evil spirits, Hong XI and Daoist communities emphasized purification, protection from a 'register' of spirit generals, and other practices to enhance cosmic qi flow.
Step-by-step explanation:
The best way to drive away evil spirits according to Hong XI and the Daoist communities that survived post the Han Dynasty was to engage in various purity practices to promote the flow of cosmic qi. Practices included abstention from alcohol and meat, meditation, vegetarian offerings, and purification rituals in anticipation of a new age. Particularly, the followers of the Celestial Master Zhang Daoling believed that sinners were vulnerable to demon attacks and would execute rituals of confession and erasure. Moreover, by maintaining a list of protective spirit generals called a 'register', adherents were provided protection from demons in exchange for a kind of tax.
Hong XI believed that the best way to drive away evil spirits was through the practice of Daoism. Daoists rejected blood sacrifice, replaced trance and orgy with written charms and petitions, exorcised demons, and brought them into a pantheon, a hierarchy of all gods. They also added new types of spirits: transcendents with their purified qi and special powers and Lord Lao, who embodied the Dao. To protect themselves from demons, adherents paid a tax and carried a register of spirit generals.