1

I just realized that in Ubuntu, if I remove (="disable") a repository, its installed packages remain installed!
For example sudo add-apt-repository --remove multiverse.

The status of this "stray" packages is unclear.

Will they be subject to apt-get dist-upgrade or apt-get upgrade?
Will they be subject to apt-get --purge autoremove?
Will they be subject to apt-get clean or any other apt-get command?

Maybe these packages just remain in some frezed state, and are becoming more and more outdated?
There is no simple command line way to even point out them, or get rid of them? Only a quite complicated (and maybe slow), like https://askubuntu.com/a/37536/851189 ?

1 Answers1

1

You can point them out thusly:

for i in $( dpkg -l | grep -E '^ii' | awk '{print $2}' ) ; \
do apt show -a "$i" 2>/dev/null  | grep -E 'Package:|APT-Sources'; done 

You may have to adjust the grep -E '^ii' to pick the packages you want out of dpkg -l.

Read man apt, and look at the output of apt show <packagename> without the filtering.

N0rbert
  • 99,918
waltinator
  • 36,399