Safe remove of packages with no more dependent
apt-get autoremove
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
libmagic1
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
or
apt-mark showmanual | grep libqt4-sql-mysql
PS: Without the grep apt-mark will show the whole list of auto or manual installed packges.
remove it and all its associated configuration and data files.– sr_ Jan 26 at 18:44libqt*issue, e.g.?name(libqt*)) – sr_ Jan 26 at 18:51Mon a category, marking all packages under this category as "installed automatically" (i.e. a dependency of something) – this selects packages not a dependency of anything for deletion (and most probably is not the best way to do this; note thatCtrl+tlets you "cancel pending actions") – sr_ Jan 26 at 19:52