try the following code
VA <- mxMatrix(name="VA", type="Symm", nrow=5, ncol=5)
DZ <- mxAlgebra(.5 %x% VA, name="covDZA")
test <- mxModel(model="test", VA, DZ )
test
names(test)
rm1 <- mxModel(test, test@matrices$VA, remove=TRUE)
rm2 <- mxModel(test, test@algebras$covDZA, remove=TRUE)
rm3 <- mxModel(test, test@algebras$DZ, remove=TRUE)
why doesn't remove=TRUE work with rm1 and rm2 while it fails to throw an error or warning with rm3?
thought that this was sorted out. see https://openmx.ssri.psu.edu/thread/269