코드 스니펫

$ sudo mkdir -p /usr/java
$ sudo touch /usr/java/aa
$ sudo touch /usr/sbin/alternatives
$ sudo apt-get remove jdk1.8.0-40
$ echo "" | sudo tee /var/lib/dpkg/info/jdk1.8.0-40.postrm

Reference

http://askubuntu.com/questions/597015/e-sub-process-usr-bin-dpkg-returned-an-error-code-1