From: Tech Geek on
>
> Jeffrey,
>
> >Don't know if there's automatic way. But one way you can try is to write a
> >script to remove those sections whose "Status" is not "installed" in the
> >file /var/lib/dpkg/status.
> I thought about that but I wondering if APT package management has some
> in-built way to do it automatically. The "status" file is an important file
> in Debian package managment system so I would prefer something from
> maintainers rather than running my home brewed script.
>
> Thanks for the reply though.
>