After a new installation of Debian, I'm looking for a way to separate files created from new packages from my main system. I want to do this to avoid bloating the size of my drive with unnecessary libraries or packages and would prefer the files be in a different drive or folder that can be deleted or used to monitor what packages should be removed.

Specific example: I've installed the cairo library so that I can compile a certain application. Suppose I later decide to uninstall this application. From my understanding, I think that just uninstalling the application will not remove the program entirely because the package manager will still keep the required library because I asked for it to be installed explicitly instead of automatically installed as part of a package dependency. How will I remember to remove this associated library? I want to do this for 10 applications at once.

I also sometimes manually install packages to try and fix certain problems or add features to an application but later find out that the installation was not actually what I wanted, and I can later forget that I've installed it. How can I detect that a package I manually installed is not actually being used by me?

I'm asking this because on my last installation of Debian, my root partition became a little bloated and I wasn't able to figure out why. It was about about 3 times the size of mt root partition now. This question is based on inference, and what I've read about how Debians package management works. Please correct any confusion.

  • I would look into the workings of apt before you try this. It can easily remove libraries which you previously installed but no-longer need. When you install a program (apt-get install ...) it will install extra libraries as they are needed. When you remove the same program (apt-get autoremove ...) will check if the libraries are still required and remove them if not. – Philip Couling Mar 4 at 16:47
  • @PhilipCouling How will I know which manually installed packages are taking the most space or are not actually being used? And If I do know that, how can I remove all of them at once? – Hussar Mar 4 at 16:56
  • "manually installed packages" are no different to automatically installed packages. They're packages, and as such they're managed through the apt family of utilities. My approach tends to be to install a relatively minimal system and add applications only as and when I need/want them. – roaima Mar 5 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.