1

After running GtkOrphan it provides a list of 8 packages suggested for removal.

enter image description here

Are there likely to be any undesirable consequences in removing any of these using the tools provided within the utility?

Output from running dpkg -l | grep ^rc:

rc  linux-image-4.18.0-15-generic                 4.18.0-15.16~18.04.1                         amd64        Signed kernel image generic
rc  linux-modules-4.18.0-15-generic               4.18.0-15.16~18.04.1                         amd64        Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc  linux-modules-extra-4.18.0-15-generic         4.18.0-15.16~18.04.1                         amd64        Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP

Running aptitude from the terminal with no parameters produces:

enter image description here

graham
  • 10,436

1 Answers1

3

I have just tested GtkOrphan on my system. And it seems that GtkOrphan is dumber than apt-get autoremove -s or aptitude search '?obsolete' (see help page for full syntax)

On my system I see that only 1 package out of 18 is correctly marked as orphan by GtkOrphan.

As far I can understand the real obsolete or locally installed package do not have any http/https/ftp link in apt-cache policy ... output. It should have only /var/lib/dpkg/status in the version table.

So we can filter output of deborphan by using some scripting (modified version of this one):

cat > find_orphan.sh << \EOF
LC_ALL=C dpkg-query --showformat='${Package}:${Status}\n' -W $@ | \
fgrep ':install ok installed' | cut -d: -f1 | \
(while read pkg; do inst_version=$(apt-cache policy $pkg \
| fgrep Installed: \
| awk '{ print $2 }'); origin=$(apt-cache policy "$pkg" \
| fgrep " *** ${inst_version}" -C1 \
| tail -n 1 \
| cut -c12-); echo $pkg $origin; done)
EOF

sh find_orphan.sh $(deborphan) | grep "/var/lib/dpkg/status" | awk '{print $1}'

or do not use GtkOrphan at all and rely on Aptitude with its Obsolete and Locally Created Packages

aptitude orphaned

or aptitude search '?obsolete':

i   rstudio                         - RStudio                               

The related bug may be the following - bug 1820906.

N0rbert
  • 99,918
  • in terminal using: sudo aptitude does not indicate any --\ Obsolete Packages and aptitude search '?obsolete' : neither so I guess from your answer, it is best to leave matters well alone. – graham Apr 14 '19 at 17:17
  • 1
    So it seems that deborphan is a bit buggy :) There is no need to remove any packages. – N0rbert Apr 14 '19 at 17:18
  • 1
    Very much appreciated and an ideal candidate to keep for reference. – graham Apr 14 '19 at 17:23