It's recommended to perform such operations from separate environment, for example - Bootable Recovery Media.