The Synaptic Package Manager has a custom filter "Missing Recommends". Is there a way to find out which packages installed on my system recommended the packages listed in this filter?
Ubuntu – Which packages recommended ‘Missing Recommends’
package-managementsynaptic
Related Solutions
A package is listed under "local or obsolete" if synaptic is not able to determine a repository from which the package was (most likely) installed from.
Explanation: the ubuntu package manager (apt/dpkg) does not keep track of the repository from which a packages was downloaded when it is installed. That means once a package is installed there is no way to tell from where it was downloaded. The package manager can only guess the source repository. It does that by matching the installed package against all available packages in all repositories.
If a package with the same name is found in a repository the version number is compared. If the version number in the repository is the same or newer then it is assumed that the package was most likely installed from that repository. If no matching package is found in any repository then synaptic declares the installed package as "local or obsolete".
There are three situation which can cause an installed package to be not found in any repository:
- You downloaded and installed the package yourself (dpkg -i foo.deb).
- You installed the package from a repository and later removed that repository (for example a PPA).
- You installed the package from a repository and later the package got removed from that repository (likely to happen in the proposed repository).
About the term "local or obsolete": the first item would be the "local" part, while the other two would be the "obsolete" part.
Self answerer reflections:
In my case, it seems that the third reason was the cause for the open office packages to be listed under "local or obsolete". I had the proposed repository enabled. The open office packages were upgraded in proposed, and later removed from proposed. I wrote more details in the answer to this question: Why are some Open Office packages marked as "local or obsolete" in Synaptic.
I get the feeling that, at the very least, you should be able to do this from the terminal.
Yes, that's fairly easy to do by looking at the timestamps in /var/lib/dpkg/info/
. For example,
ls -lct /var/lib/dpkg/info |egrep -o "May.*\." | cut -d. -f1 | uniq | more
-lct
sorts by ctime, "May" is the current (or recent) month you're looking for, cut
simply removes the annoying period at the end, and uniq
removes duplicates. This gives you something like:
... May 11 18:03 libcogl-pango0:amd64 May 11 18:03 libcogl9:amd64 May 11 18:03 libcaribou0:amd64 May 11 18:03 libcaribou-common May 11 03:35 libcpufreq0 May 11 03:35 cpufrequtils ...
Suppose you want to batch-remove all the packages installed on May 11 at 18:03, you would do something like this:
apt-get remove `ls -lct /var/lib/dpkg/info | egrep -o "May.*18:03.*\." | cut -d. -f1 | uniq | cut -d' ' -f4 | tr '\n' ' '`
where the 2nd cut
simply selects the package names and tr
converts the linebreaks to spaces to give you a list suitable for apt-get
.
Best Answer
Aptitude can perform some fairly fancy searches
This will show all the packages that have a Recommends that isn't satisfied:
To restrict it to a specific recommended package: