Como posso remover um pacote e suas dependências? [duplicado]

0

Como posso voltar ao estado antes da instalação do pacote?

Instalar:

# apt-get -y install --no-install-recommends build-essential
...
The following additional packages will be installed:
  binutils cpp cpp-5 dpkg-dev g++ g++-5 gcc gcc-5 libasan2 libatomic1
  libc-dev-bin libc6-dev libcilkrts5 libdpkg-perl libgcc-5-dev libgdbm3
  libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpfr4 libmpx0 libperl5.22
  libquadmath0 libstdc++-5-dev libtsan0 libubsan0 linux-libc-dev make patch
  perl perl-modules-5.22 xz-utils
Suggested packages:
  binutils-doc cpp-doc gcc-5-locales debian-keyring g++-multilib
  g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib manpages-dev autoconf
  automake libtool flex bison gcc-doc gcc-5-multilib libgcc1-dbg libgomp1-dbg
  libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg
  libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg glibc-doc
  libstdc++-5-doc make-doc ed diffutils-doc perl-doc libterm-readline-gnu-perl
  | libterm-readline-perl-perl
Recommended packages:
  fakeroot libalgorithm-merge-perl manpages manpages-dev
  libfile-fcntllock-perl rename
The following NEW packages will be installed:
  binutils build-essential cpp cpp-5 dpkg-dev g++ g++-5 gcc gcc-5 libasan2
  libatomic1 libc-dev-bin libc6-dev libcilkrts5 libdpkg-perl libgcc-5-dev
  libgdbm3 libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpfr4 libmpx0
  libperl5.22 libquadmath0 libstdc++-5-dev libtsan0 libubsan0 linux-libc-dev
  make patch perl perl-modules-5.22 xz-utils

Remoção:

# apt-get -y --purge --auto-remove remove build-essential
...
The following packages will be REMOVED:
  build-essential*

# apt-get -y --purge autoremove
...
The following packages will be REMOVED:
  g++* g++-5* libstdc++-5-dev*

Por que as outras coisas são mantidas?

    
por Velkan 28.04.2017 / 13:02

1 resposta

1

Resumindo:

sudo bash -c 'echo "Apt::AutoRemove::SuggestsImportant false;" > /etc/apt/apt.conf.d/01autoremove-suggested'

Esse comportamento é controlado pela opção Apt::AutoRemove::SuggestsImportant .

% bl0ck_qu0te%

Fonte:

O Aptitude não remove pacotes instalados automaticamente

    
por Velkan 28.04.2017 / 13:30