Safe remove of packages with no more dependent
That will give a list of packages pull in by dependency but no longer needed (All dependent packages removed).
Reason packages not showing up in the list
- They are still used(dependent) by other packages
- They are installed manually, not pull in by dependency.
Check Reverse Dependency
To check if a package is needed by others, use
apt-rdepends -r <pacakge>
# apt-rdepends -r libmagic1| head
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reverse Depends: aegis (4.24.3-3)
Reverse Depends: aegis-web (4.24.3-3)
Reverse Depends: dares (0.6.5-6)
Reverse Depends: dares-qt (0.6.5-6)
Reverse Depends: dff (1.2.0+dfsg.1-1)
Reverse Depends: ebook-speaker (2.0-2)
Reverse Depends: file (= 5.09-2)
Reverse Depends: file-roller (3.4.1-0ubuntu1)
Reverse Depends: fossology-agents (1.2.0-3.1ubuntu2)
That will show list of packages depending on libmagic1. The reason
head is used is because
apt-rdepends -r will recursively calculate the reverse dependency. To see if
libmagic1 is depended by anything, we only need the top few lines.
Check apt-get auto-install state
To check if a package is installed manually through apt-get or aptitude
apt-mark showauto | grep libqt4-sql-mysql
apt-mark showmanual | grep libqt4-sql-mysql
PS: Without the
apt-mark will show the whole list of auto or manual installed packges.