Score:0

Keeping Ubuntu Clean - Dependencies/Repositories

pr flag

I've tried doing some googling on this, but it could be that I'm not asking the right question here.

I'm sure I'm not the only one who does this, but I imagine for most newcomers if you are looking to install/fix something, you probably google the problem and follow the instructions presented (or keep trying until something works) without fulling knowing the result of what you are doing.

My question specifically relates to when installing various pieces of software, and they are as follows:

  • When trying to install various programs, dropbox, onedrive clients, etc, it always seems like you need to include random repositories. What happens when you add such repositories to your system going forward? Will it uncessarily keep track of it? Is it secure since it is not one of the official sources? Should you clean these up? Or leave these "on" so that the downloaded software can be updated?
  • When you install random software, it seems like there are usually several dependencies that are needed. Is it OK to just install what it requires? While I can't confirm, it seems like sometimes you will install multiple versions of the same dependencie (I think sql comes to mind that I saw recently). Won't it "clog" your system so to speak having all these versions floating around?

Basically what I am after is to just keep my system clean (if it even matters) and not packed full of random pieces of potentially conflicting software that aren't used.

If there are any resources that will be good for me to read, please pass them along.

Thanks in advance for your help on this and Happy New Year!

Organic Marble avatar
us flag
While this is an important topic, what you are asking might need an extensive reply.
pr flag
Thanks @OrganicMarble. Do you have some quick points/resources you can share? I realize that this is more of a nebulus topic, however, I feel like it's an important one.
ar flag
Welcome to Ask Ubuntu. In this question answer site it is best to ask one question at a time. See [the site help](https://askubuntu.com/help) for how to ask questions here. [Your first question already has answers here](https://askubuntu.com/questions/307/how-can-ppas-be-removed) and therefore is a duplicate. See [this question](https://askubuntu.com/questions/337780/why-autoremove-is-not-called-whenever-i-remove-a-package) for how to use `sudo apt autoremove`.
user535733 avatar
cn flag
They are indeed good questions, and we have answered questions like these many times before, often to folks in distress. Yes, filling your system with non-Ubuntu software may have awful consequences someday. Maybe sooner, maybe later. Yes, dependencies that conflict can be terrible to diagnose and resolve. Yes, we recommend that popular software flow through Debian and the Ubuntu repositories, preventing all those problems and more. Keep up your research on how apt and dpkg and snaps and Debian work.
ar flag
See the answer to [Why does a program need 64MB to install but frees up 3.5 MB when it is removed later in Ubuntu?](https://askubuntu.com/questions/514676/why-does-a-program-need-64mb-to-install-but-frees-up-3-5-mb-when-it-is-removed-l/514690#514690)
pr flag
Thanks all. This is all very helpful so far. Have a happy NYE.
Score:0
cn flag

the apt package manager does keep track of what what installed as a dependency of another application and will keep track of these 'orphaned' dependencies that can be removed after their parent package has been removed.

when you run apt you will see the message that certain packages are no longer necessary and can be removed with apt autoremove

there are graphical applications that you can use to do basically the same thing, but it's way easier from the command line (IMHO)

extra reading: What is the advantage of using sudo apt-get autoremove over a cleaner app?


there are three types of 'dependencies' that you can get when installing packages: required, suggested, and recommended. The required must be installed and there's no getting around that. The suggested will not be installed by default, but you can get them by asking for them with the --install-suggests flag. The recommended will be installed by default unless you specify that you don't want them with the ``--no-install-recommends` flag.


This is by no means an exhaustion of the topic but should give you confidence in that's going on and the ability to keep a clean system.

pr flag
Thanks Chris! Really appreciate the added comments here. Will look into all this. Have a Happy NYE!
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.