Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-07-2009, 05:17 PM
|
#1
|
Member
Registered: Jan 2004
Posts: 307
Rep:
|
how do I get rid of autoremove
How do I set apt-get to not use autoremove?
Yes, I still use apt-get...I tried aptitude but it seems to apply autoremove automatically which is a disaster waiting to happen. So far it has tried to remove virtually all of kde several times and it did manage to completely kill my operating system by removing all kernel-images on one occasion....which eventually led to scrapping the computer but that is a whole 'nother ugly story.
I have used "aptitude keep-all" command which appears to clear the autoremove list but it has to be re-issued every time something is added to the list.
|
|
|
04-07-2009, 06:44 PM
|
#2
|
Senior Member
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,905
|
Either edit apt.conf and/or apt.conf.d or create it if it doesn't exist.
// auto-remove breaks on meta packages
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";
// Recommends are as of now still abused in many packages
APT::Install-Recommends "0";
APT::Install-Suggests "0";
Debug::pkgAutoRemove "0";
|
|
1 members found this post helpful.
|
04-07-2009, 06:51 PM
|
#3
|
Member
Registered: Jan 2004
Posts: 307
Original Poster
Rep:
|
Thank You.
Do those double slashes before lines turn the line into a comment?
|
|
|
04-08-2009, 01:04 PM
|
#4
|
Senior Member
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,905
|
Quote:
Originally Posted by CrashedAgain
Thank You.
Do those double slashes before lines turn the line into a comment?
|
Yes.
|
|
|
04-08-2009, 07:55 PM
|
#5
|
Member
Registered: Mar 2004
Location: Houston,Texas
Distribution: Via Debian!!!
Posts: 113
Rep:
|
Quote:
Originally Posted by CrashedAgain
How do I set apt-get to not use autoremove?
Yes, I still use apt-get...I tried aptitude but it seems to apply autoremove automatically which is a disaster waiting to happen. So far it has tried to remove virtually all of kde several times and it did manage to completely kill my operating system by removing all kernel-images on one occasion....which eventually led to scrapping the computer but that is a whole 'nother ugly story.
I have used "aptitude keep-all" command which appears to clear the autoremove list but it has to be re-issued every time something is added to the list.
|
Don't know where you're coming from but I have to disagree with you. 'Autoremove' has not posed a problem with my Debian OS at all. I'm a new user to Aptitude (former apt-get user) and I have learned to do an 'Aptitude keep-all' before going forth. Boy did I learn that the hard way. But nothing after that command, and I mean nothing has been deleted or removed unless I so request. Same for 'autoclean'.
|
|
1 members found this post helpful.
|
04-08-2009, 10:13 PM
|
#6
|
Member
Registered: Jan 2004
Posts: 307
Original Poster
Rep:
|
....but what you are doing is exactly what I was doing, namely NOT using autoremove.
"Aptitude keep-all" issued before using aptitude will clear the autoremove list thus 'disabling' auto remove since it has nothing to remove.
So why not just disable it altogether? Suppose you remove something trivial that was installed at part of a big meta-package (like "kde") then just happen to forget to 'keep all' next time you use aptitude. All of a sudden EVERYTHING related to kde is history.
There is another thread on this http://www.linuxquestions.org/questi...e-lies-698024/
wherein somebody suggests not using meta-packages.
Doesn't it make more sense to not use autoremove?
....and, as I said in my initial post, autoremove did manage to remove my operating kernel, which of course completely trashed the entire system. This was on an old laptop which needed a pcmcia insert internet card. Support for that card was lost beginning with kernel 2.6.25. All install disks I had available used newer kernels so could not be used for reinstall since there was no way to connect to internet. I finally found one very old knoppix disk that would work. I reinstalled using that system (knoppix 3.3, about 2004 vintage) but it broke every time I tried to upgrade it. I bought a "Retail Plus" usb wireless because it was supposed to work with linux....but it doesn't. It came with a linux driver source code but I could not compile it (googling tells me nobody else can either). I tried ndiswrapper but it must be compiled to match the operating kernel which was so old I could not find the necessary dependencies for compiling. I installed a newer system (newer kernel) but then couldn't get all the necessary dependencies for compiling with it either because no internet connection. I tried matching the kernel on my other computer, compiling ndiswrapper then transferring the file over but that didn't work either. I spent a long, very frustrating time (weeks) doing this but finally had to give up and scrap the computer.
If not for autoremove I would still have a laptop.
It IS a disaster waiting to happen.
|
|
1 members found this post helpful.
|
09-27-2015, 01:49 AM
|
#7
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Rep:
|
hours into recovery after a carelessly copy/pasted aptitude INSTALL command uninstalled 333 "unused" packages from my ubuntu studio installation that were actually dependencies of everything. autoremove is AWFUL, HOW IS IT THE DEFAULT APTITUDE BEHAVIOUR?
|
|
|
09-27-2015, 02:57 AM
|
#8
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
Are you using testing or unstable?
If you are, this is expected. They break Debian. It's the nature of these two repositories. Sometimes a package gets updated, others don't, and dependencies conflict. Aptitude wants to resolve these dependencies and thinks it knows better than you do.
And guess what guys? Before it did anything, it asked if you were sure, unless you used -y, --force, etc. You didn't read what it told you it was going to do, did you?
testing and unstable are not for those who want up to date software but not willing to keep up with aptitude. Sorry, it's as simple as that.
If you want shiny and have some Shiny New Stuff, check out backports.
If you're using stable this shouldn't have happened, and you have something else going on.
Are you mixing release repositories?
If you are, this is expected. They break Debian.
Are you using third party repositories?
If you are, this is expected. They break Debian.
Last edited by goumba; 09-27-2015 at 02:59 AM.
|
|
1 members found this post helpful.
|
09-27-2015, 03:12 AM
|
#9
|
Senior Member
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
|
Quote:
Originally Posted by SlimeQ
hours into recovery after a carelessly copy/pasted aptitude INSTALL command uninstalled 333 "unused" packages from my ubuntu studio installation that were actually dependencies of everything. autoremove is AWFUL, HOW IS IT THE DEFAULT APTITUDE BEHAVIOUR?
|
First; I doubt it was necessary to resurrect a six-and-a-half year old thread.
Second; What goumba posted. Aptitude asks for confirmation before doing something. apt-get tells the user what is no longer needed and suggests removing them with autoremove.
Third; Why did you copy-and-paste an aptitude command? The commands are short and easy to remember.
Forth; What goumba posted. Why are you installing Ubuntu packages on your Debian system?
Fifith; Are you using Testing without knowing what you are doing? If so, use Stable and do not install packages from foreign repositories.
|
|
|
09-28-2015, 11:40 AM
|
#10
|
Senior Member
Registered: Apr 2005
Posts: 2,727
|
Quote:
Originally Posted by SlimeQ
hours into recovery after a carelessly copy/pasted aptitude INSTALL command
|
Carelessly copied and pasted from where exactly?
Quote:
Originally Posted by SlimeQ
uninstalled 333 "unused" packages from my ubuntu studio installation that were actually dependencies of everything. autoremove is AWFUL, HOW IS IT THE DEFAULT APTITUDE BEHAVIOUR?
|
Those packages were pulled in as dependencies of another package - you had probably removed that package. Being pulled in as dependencies marks them as automatically installed. autoremove simply removes automatically installed packages which are no longer dependencies of anything. aptitude runs an autoremove by default - always has. If you don't like it, read the manual and find out how to change the default behaviour, or don't use it.
Command output also asks for confirmation (unless you specified -y) and lists what will be installed/removed/purged, etc.
Last edited by cynwulf; 09-28-2015 at 11:42 AM.
|
|
|
09-29-2015, 01:20 AM
|
#11
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Rep:
|
I am not on unstable repositories, but I am on Ubuntu Studio 14.04 which i must presume uses several third-party repositories, but mostly just ubuntu trust main. Regardless of whether or not this is a stable set up, I did not install aptitude, I do not use aptitude, nor do I have a fantastic grasp of how it functions differently than apt-get.
The command in question was just a simple install command on a git repo by someone who was using aptitude on debian. Nothing big or dangerous, just some libraries and stuff. The exact command was;
$ sudo aptitude install omake libfuse-dev camlidl libpcre-ocaml-dev libbatteries-ocaml-dev
After some digging I was able to get a list of removed packages from the aptitude log and reinstall them. These "unused dependencies" included my network manager, audio drivers, several databases, apache2, gtk2, a most python modules... it was not trivial. I was unable to connect to the internet and my computer was crippled for several hours because I had no way of knowing aptitude's default behavior. Absolutely insane. I have since disabled autoremove (hence my posting in this particular thread detailing how to disable autoremove) and also uninstalled aptitude. I obviously am not going to be using it in the future, but it baffles me that nobody here sees this as a problem. As CrashedAgain noted 6 years ago, this is a disaster waiting to happen. Especially when aptitude comes standard on most debian based systems that will inevitably have non-debian-stable repositories added. Why exactly is autoremove on by default when it clearly causes people problems on non-standard repos? Doesn't it make more sense to change the default setting, rather than just telling all the victims of this bug that they're stupid for not reading the manual?
|
|
|
09-29-2015, 02:59 AM
|
#12
|
Senior Member
Registered: Mar 2012
Posts: 1,882
|
It's not a bug, it's a feature
And, yes, you should have a basic grasp of the tools you are using.
Do you remove all the teeth from all chainsaws because some numpty might try to hold one from the wrong end?
|
|
|
09-29-2015, 03:58 AM
|
#13
|
Senior Member
Registered: Apr 2005
Posts: 2,727
|
autoremove being on or off by default is a preference.
If you use apt-get as your package manager, then you should have installed those packages with apt-get. You're essentially blaming aptitude for this, when in fact it was you who willingly copied and pasted a command from the web without understanding the implications. It was also you who answered "yes" to the question of whether to remove all of those packages.
Packages managers have to run as root, so just copying and pasting some stuff from the web and running it as root in a leap of blind faith is 'careless'.
|
|
|
09-30-2015, 02:51 AM
|
#14
|
Senior Member
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
|
Quote:
Originally Posted by SlimeQ
The command in question was just a simple install command on a git repo by someone who was using aptitude on debian.
|
As already stated in the previous post:
1) You chose "Yes" to the operation.
2) Copy-and-pasting commands one does not understand is a bad idea.
Quote:
I am not on unstable repositories, but I am on Ubuntu Studio 14.04 which i must presume uses several third-party repositories, but mostly just ubuntu trust main. ... Nothing big or dangerous, just some libraries and stuff.
|
1) The Debian sub-forum is probably not the best place to complain if apt-get has problems on an Ubuntu system.
2) Mostly the main Ubuntu repository. This is awfully similar to Debian users posting "I only have one or two packages installed from Testing/Unstable/Ubuntu/Mint/Kali, so my system is borked because apt-get is crap."
Quote:
Regardless of whether or not this is a stable set up, I did not install aptitude, I do not use aptitude, nor do I have a fantastic grasp of how it functions differently than apt-get.
|
I suppose reading the documentation that explains the differences in use and provides a list of commands to use is out of the question?
Quote:
Especially when aptitude comes standard on most debian based systems that will inevitably have non-debian-stable repositories added.
|
Is it not the responsibility of the makers of those systems to configure software to their needs? Debian did not force them to use it without modifying it for their specific needs.
Quote:
Why exactly is autoremove on by default when it clearly causes people problems on non-standard repos?
|
If someone wants to use a "non-standard" repository, the onus is on that person to learn a little before doing things. It is not the software's fault if someone tries to do something "non-standard" without knowing what they are doing.
Quote:
Doesn't it make more sense to change the default setting, rather than just telling all the victims of this bug that they're stupid for not reading the manual?
|
How is it a bug? If someone is "too stupid to read the manual," that person is too stupid to manage a system.
|
|
|
10-02-2015, 05:48 PM
|
#15
|
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
|
Quote:
Originally Posted by descendant_command
And, yes, you should have a basic grasp of the tools you are using.
|
Yep, or you end up with cases like there, where the differences between aptitude and apt-get come to bite you in the rear end.
|
|
|
All times are GMT -5. The time now is 07:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|