You can use the 'keep()' function from the 'gdata' package:
library(gdata)
The below command will show you which objects will be removed:
> keep(num1)
[1] "num2" "num3" "num4" "num5"
To remove those objects, you need to add sure=TRUE
keep(num1,sure = TRUE)
ls()
[1] "num1"