Remove unnecessary permissions and aliases.