Você também pode manter um pacote, para que ele não seja removido automaticamente durante a execução do comando sudo apt-get autoremove
.
sudo apt-mark hold <package-name>
Para suspender o pacote suspenso,
sudo apt-mark unhold <package-name>
Exemplo:
$ sudo apt-get -s autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap
0 upgraded, 0 newly installed, 6 to remove and 13 not upgraded.
Remv apache2-bin [2.4.7-1ubuntu4]
Remv apache2-data [2.4.7-1ubuntu4]
Remv libaprutil1-ldap [1.5.3-1]
Remv libaprutil1-dbd-sqlite3 [1.5.3-1]
Remv libaprutil1 [1.5.3-1]
Remv libapr1 [1.5.0-1]
$ sudo apt-mark hold apache2-bin
apache2-bin set on hold.
$ sudo apt-get -s autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
apache2-data
0 upgraded, 0 newly installed, 1 to remove and 13 not upgraded.
Remv apache2-data [2.4.7-1ubuntu4]