Research on software reliability growth models (SRGMs) has been extensively conducted for decades, and the models were often developed based on two assumptions: (1) once the errors are detected, they can be completely removed instantly, and (2) errors can be removed eternally, and the debugging tasks will not produce any new errors. How-ever, both assumptions are unrealistic. This study proposes an SRGM that ignores these restricted assumptions by introducing a detection process that may remove an error after a period of time once it has been detected and by considering imperfect debugging, which indicates that new errors may emerge through corresponding debugging tasks. In addi-tion, because software can be upgraded to respond on a timely basis to constantly changing consumer expectations and thus extend product life in the market, the proposed SRGM also considers software upgrades for the multiversion software, and a dynamic program-ming approach is used to effectively obtain the optimal release schedule with consideration of the constraint of budget. Real data sets are used to examine the effectiveness of the pro-posed model, and the fitting results show that the proposed model outperforms other existing models. The results of numerical validation indicate that the proposed dynamic programming method with information updating outperforms the sequential solution method in determining the optimal release time for each version. Moreover, decision makers should carefully evaluate the parameters because overestimating the parameters of the mean value functions will cause serious software risk due to excessively shortening the testing time.