• Derivation of rank-Greville algorithm, maintaining a general rank factorization. • Exploiting rank-deficiency to reach an asymptotic computational complexity of O(mr) for updating a least-squares solution when adding an observation. • Publically available implementation in Python3, using Numpy. Updating a linear least-squares solution can be critical for near real-time signal-processing applications. The Greville algorithm proposes a simple formula for updating the pseudoinverse of a matrix A ∈ R n × m with rank r. In this paper, we explicitly derive a similar formula by maintaining a general rank factorization, which we call rank-Greville. Based on this formula, we implemented a recursive least-squares algorithm exploiting the rank-deficiency of A , achieving the update of the minimum-norm least-squares solution in O (m r) operations and, therefore, solving the linear least-squares problem from scratch in O (n m r) operations. We empirically confirmed that this algorithm displays a better asymptotic time complexity than LAPACK solvers for rank-deficient matrices. The numerical stability of rank-Greville was found to be comparable to Cholesky-based solvers. Nonetheless, our implementation supports exact numerical representations of rationals, due to its remarkable algebraic simplicity. [ABSTRACT FROM AUTHOR]