Score:3

How to list software already installed through apt, but no longer in the apt reposity sources list

cn flag

Assume that, by using apt I installed Microsoft Edge to the system after adding a source for it and then after the installation I (accidentally) removed the "apt / sources.list" file that I had added. For example:

# echo 'deb [arch=amd64] https://packages.microsoft.com/repos/edge/ stable main' \
    > /etc/apt/sources.list.d/microsoft-edge.list
# apt install microsoft-edge-stable
# rm /etc/apt/sources.list.d/microsoft-edge.list

I think that after the above commands, I will no longer be able to upgrade Microsoft Edge.

Is there a method to list such "orphaned" software on the system?

ChanganAuto avatar
us flag
Indeed without the (3rd party in this case) repository the software won't update. How to list "orphaned" software I don't know but it's a very good question.
Score:2
us flag

aptitude gives you this functionality

enter image description here

Highlight the line and press enter to see the list of packages.

It will show all packages you installed from .debs that are not found in any repos, as well as any packages left from removed repos.

Andrew Lowther left a useful comment giving the one-liner version using aptitude:

aptitude search '?obsolete' 

If you want a GUI app, Synaptic Package Manager has the same functionality. Select Status at the bottom and look in the Installed (local or obsolete) category.

enter image description here

Andrew Lowther avatar
jp flag
Also `aptitude search '?obsolete'`
Organic Marble avatar
us flag
@AndrewLowther thanks! Will add to answer (with attribution).
Score:0
cn flag

Although the answer from @OrganicMarble is OK, after doing some further research, I found out that (on recent versions of Ubuntu) the command:

$ pro security-status --unavailable
2775 packages installed:
     12 packages no longer available for download

Packages that are not available for download may be left over from a
previous release of Ubuntu, may have been installed directly from a
.deb file, or are from a source which has been disabled.

Packages:
dropbox fpc-laz fpc-src lazarus-project libfam0 libssl1.1 libwxgtk3.0-0v5
microsoft-edge-stable python-apt-common python3-apt veracrypt viber

For example, run:
    apt-cache policy viber
to learn more about that package.

will also list these packages.

Another option to list the packages (without installing any new tool like aptitude or synaptic as suggested in the other answer) is this:

$ apt --installed list |  grep -i 'local\]$'
$ apt list ?obsolete
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.