Score:1

does "sudo apt --purge autoremove pkgname" clear literally all the dependencies or just the ones installed with the package?

gh flag

I wanted to remove some random packages I had installed to try and get my Xbox controllers working, so I typed sudo apt --purge autoremove xboxdrv ubuntu-xboxdrv, as I read from this thread. The top answer says that this removes all dependencies as well, and I was unsure if that meant exclusively the dependencies installed with the package or literally all of its dependencies, including the ones that come installed with Ubuntu 22.04.

This probably isn't needed but here are all the dependencies that would be removed by the aforementioned command;

  libaacs0* libaom3* libass9* libavcodec58* libavformat58* libavutil56* libbdplus0* libblas3* libbluray2* libbs2b0*
  libchromaprint1* libcodec2-1.0* libdav1d5* libflashrom1* libflite1* libftdi1-2* libgme0* libgstreamer-plugins-bad1.0-0*
  libigdgmm12* liblilv-0-0* libmfx1* libmysofa1* libnorm1* libopenmpt0* libpgm-5.3-0* libpostproc55* librabbitmq4*
  librubberband2* libserd-0-0* libshine3* libsnappy1v5* libsord-0-0* libsratom-0-0* libsrt1.4-gnutls* libssh-gcrypt-4*
  libswresample3* libswscale5* libudfread0* libva-drm2* libva-wayland2* libva-x11-2* libva2* libvdpau1* libvidstab1.1*
  libx265-199* libxvidcore4* libzimg2* libzmq5* libzvbi-common* libzvbi0* mesa-va-drivers* mesa-vdpau-drivers*
  pocketsphinx-en-us* ubuntu-xboxdrv* va-driver-all* vdpau-driver-all* xboxdrv*
Score:1
st flag

I'd use a lot of caution with using that command because I've had it take out packages that seemingly have nothing to do with it. It can leave your system inoperable if you don't validate everything that's on the "deletion list" and otherwise put it back in. For example, in the dependencies for ubuntu-desktop and kubuntu-desktop there is xorg and it will delete it. Anyway, just make sure what you think is there is still there after running it. If you ran that it would certainly mess you up if you suddenly didn't have your X server.

You can see the dependency list with

apt-cache show package-name

And, you will marvel at how they are all linked together and how quickly you can delete your entire computer by accident. =)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.