E: Sub-process /usr/bin/dpkg returned an error code (1) when purge code example Example: Sub-process /usr/bin/dpkg returned an error code sudo apt-get remove --purge package_name