Ultracold neutron (UCN) storage measurements were made in a trap constructed from a 1.3-T Halbach octupole permanent (HOPE) magnet array aligned vertically, using the TES port of the PF2 source at the Institut Laue-Langevin. A mechanical UCN valve at the bottom of the trap was used for filling and emptying. This valve was covered with Fomblin grease to induce nonspecular reflections and was used in combination with a movable polyethylene UCN remover inserted from the top for cleaning of above-threshold UCNs. Loss from UCN depolarization was suppressed with a minimum 2-mT bias field. Without using the UCN remover, a total storage time constant of (712±19)s was observed; with the remover inserted for 80 s and used at either 80 cm or 65 cm from the bottom of the trap, time constants of (824±32)s and (835±36)s were observed. Combining the latter two values, a neutron lifetime of τn=(887±39)s is extracted after primarily correcting for losses at the UCN valve. The time constants of the UCN population during cleaning were observed and compared to calculations based on kinetic theory as well as Monte Carlo studies. These calculations are used to predict above-threshold populations of ∼5%,∼0.5%, and ∼10-12% remaining after cleaning in the no-remover, 80-cm remover, and 65-cm remover measurements. Thus, by using a nonspecular reflector covering the entire bottom of the trap and a remover at the top of the trap, we have established an effective cleaning procedure for removing a major systematic effect in high-precision τn experiments with magnetically stored UCNs.