On 02/10/2023 17:05, Ottavio Caruso wrote:
Before you say:
$ apt list '?narrow(?installed, ?not(?origin(Debian)))'
The problem with that is there are packages that I added from the Linux
Mint repos (not manually) and that I want to keep and they all have the
tag "local". For example:
mintmenu/now 6.1.5 all [installed,local]
mintreport/now 1.3.5 all [installed,local]
mintsources/now 2.1.9 all [installed,local]
Apt does not store in its DB from which sources particular packages were
installed. Filters are based on presence of packages in currently
configured repositories. See apt-patterns(7) for various available
options such as ~M for automatically installed packages. I would try
apt list '~o!~M'
To get list of local manually installed packages. If the number of them
is not high you may remove them and then run
apt autoremove --purge
Notice that packages from non-standard repositories may break upgrade
due to their dependencies.