LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-19-2014, 03:41 PM   #1
fixer1234
Member
 
Registered: Aug 2014
Location: Virginia, USA
Posts: 51

Rep: Reputation: Disabled
How to uninstall software in Debian while handling dependencies correctly?


I tried loading several office suites in Debian. There would be selected components that I didn't need and wanted to uninstall. Mint handles this situation "intelligently", distinguishing dependencies used only by the uninstalled program from those also used by other programs. Debian does not appear to do so. It presents you with a list of dependencies to OK for deletion, but many are used by other programs. It seems to want to delete everything that was associated with the suite if you try to uninstall any piece. I could uninstall just the actual named package. Is there a way to then purge components that are not used by any installed program?
 
Old 08-19-2014, 06:12 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,341

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by fixer1234 View Post
Is there a way to then purge components that are not used by any installed program?
After you remove a package you can get rid of that package's dependencies which are not also used by an existing installed package by using this command:

apt-get autoremove

which removes orphaned packages.

I suggest that you read the man pages for apt-get to make sure that autoremove does exactly what you want.

-----------------------------
Steve Stites
 
1 members found this post helpful.
Old 08-19-2014, 06:53 PM   #3
fixer1234
Member
 
Registered: Aug 2014
Location: Virginia, USA
Posts: 51

Original Poster
Rep: Reputation: Disabled
Thanks for pointing me in the right direction. Looks like I have some reading to do on the variations and options identified from your lead (different tools for different kinds of litter: autoremove, autoclean, localepurge, and deborphan identified so far, along with warnings to take precautions). That's what I was looking for.

Last edited by fixer1234; 08-19-2014 at 06:55 PM.
 
Old 08-19-2014, 07:10 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Please be aware that the autoremove option can be quite dangerous, especially when it comes to meta-packages.
Metapackages are packages that don't contain any actual software, but have a bunch of dependencies. This mechanism is used to pull in whole software sets, like desktop environments, office suites and so on.

If you remove a part of a software suite installed using such a meta-package the package manager realizes that not all dependencies for that meta-package are installed anymore and will remove it. That causes of course the whole suite to be a dependency that it is not needed anymore, so that an apt-get autoremove call will uninstall the complete suite. While this is annoying when it comes to an office suite it is also very easy to accidentally remove large parts of your OS.

The Debian package manager assumes that you know what you are doing, so make sure to always read the output of apt-get/aptitude before confirming any action and do not confirm if you are in doubt. Debian comes with all the tools you need to determine why a dependency or package is installed, so reading up on this is definitely a good idea, but if in doubt just ask.
 
Old 08-19-2014, 07:24 PM   #5
fixer1234
Member
 
Registered: Aug 2014
Location: Virginia, USA
Posts: 51

Original Poster
Rep: Reputation: Disabled
Yeah, that "you can totally screw up everything" aspect is a little worrisome. Even doing the "dry run" option to see what would be removed isn't particularly helpful because there is no way to know what the list of removal candidates are used for.
 
Old 08-19-2014, 10:23 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Debian won't ever remove dependencies for other, still installed, packages unless you explicitly tell it to do so, if you mean that.
For general package information Debian offers tools enough for that, for example
Code:
apt-cache depends package
to get the list of dependencies for a package,
Code:
apt-get rdepends package
to get a list of packages that depend on this package or
Code:
apt-cache show package
to get a short description of a package, including dependencies, suggested additional packages, size, ... .

From the binary distributions I deem the APT package management system to be the most flexible and powerful, you just have to know how to handle it properly.
 
Old 08-19-2014, 11:54 PM   #7
fixer1234
Member
 
Registered: Aug 2014
Location: Virginia, USA
Posts: 51

Original Poster
Rep: Reputation: Disabled
My main application for this apparently involves meta-packages, so it looks like I should become a lot more familiar with this stuff. Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to uninstall a package having dependencies uxan Linux - General 10 02-29-2008 10:28 AM
Uninstall with dependencies lcp052 Linux - Newbie 2 11-16-2005 12:07 AM
uninstall software and dependencies props666999 Slackware 1 11-30-2004 01:25 PM
Suse 9.1 / Debian uninstall software hotel-lima Linux - Distributions 0 08-14-2004 11:17 AM
More on Mozilla Uninstall Dependencies Spotnik Linux - Software 2 01-29-2004 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration