Howto remove orphan packages in Ubuntu

There is usually some orphan packages left on the system after upgrading Ubuntu from one major version to another. These packages can cause strange errors like Ubuntu bug #151045. The solution to this problem is a package named deborphan. deborphan removes orphan packages that are left on your Ubuntu installation and you should run this program after any major Ubuntu upgrade.

Install and run deborphan

# sudo aptitude install deborphan
# sudo deborphan



These files were listed on one of my Ubuntu 8.04 installations. This installation had been upgraded from a previous LTS version.

All we have to do now is to remove those orphaned packages

# sudo deborphan | xargs sudo aptitude purge -y

This howto has not been tested on a Debian distribution, but I guess it will work there also.


  1. aditya menon 8. August 2013
  2. Dmitry 15. October 2013