3

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?

FedKad
  • 10,515
  • 2
    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. – ChanganAuto Dec 06 '22 at 20:08

2 Answers2

2

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

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
1

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
FedKad
  • 10,515