0

I just upgrade from ubuntu 16.04 to Ubuntu 18.04.

Before then end of the upgrade, it asked me if I want to delete obsoletes packages and packages installed automatically no more used.

I answered "no", because I need to keep some packages (php7.0). Now I migrated to the newer packages (php7.2) how do I retrieve and delete obsoletes packages ?

I tried apt autoremove but it seems not to delete obsolete packages. What is the command used by do-release-upgrade to retrieve these packages ?

1

2 Answers 2

0

This answer has a couple of examples on how to retrieve obsolete packages.

It should be fairly easy then to remove them.

A simple oneliner (warning not tested!) can be:

aptitude show '~o' | grep Package: | cut -d' ' -f2 | xargs -n1 -l --verbose sudo apt-get purge -y
0

I use

apt list --installed | grep -v xenial

to list all packages that are not in Xenial (change release name accordingly, of course). Then I remove them manually; I am extremely wary of automating package management tasks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .