LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-07-2009, 05:17 PM   #1
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
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.
 
Old 04-07-2009, 06:44 PM   #2
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,905
Blog Entries: 29

Rep: Reputation: 537Reputation: 537Reputation: 537Reputation: 537Reputation: 537Reputation: 537
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.
Old 04-07-2009, 06:51 PM   #3
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Original Poster
Rep: Reputation: 33
Thank You.

Do those double slashes before lines turn the line into a comment?
 
Old 04-08-2009, 01:04 PM   #4
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,905
Blog Entries: 29

Rep: Reputation: 537Reputation: 537Reputation: 537Reputation: 537Reputation: 537Reputation: 537
Quote:
Originally Posted by CrashedAgain View Post
Thank You.

Do those double slashes before lines turn the line into a comment?
Yes.
 
Old 04-08-2009, 07:55 PM   #5
alioop
Member
 
Registered: Mar 2004
Location: Houston,Texas
Distribution: Via Debian!!!
Posts: 113

Rep: Reputation: 22
Quote:
Originally Posted by CrashedAgain View Post
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.
Old 04-08-2009, 10:13 PM   #6
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Original Poster
Rep: Reputation: 33
....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.
Old 09-27-2015, 01:49 AM   #7
SlimeQ
LQ Newbie
 
Registered: Jun 2008
Posts: 4

Rep: Reputation: 0
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?
 
Old 09-27-2015, 02:57 AM   #8
goumba
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
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
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.
Old 09-27-2015, 03:12 AM   #9
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Quote:
Originally Posted by SlimeQ View Post
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.
 
Old 09-28-2015, 11:40 AM   #10
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368
Quote:
Originally Posted by SlimeQ View Post
hours into recovery after a carelessly copy/pasted aptitude INSTALL command
Carelessly copied and pasted from where exactly?

Quote:
Originally Posted by SlimeQ View Post
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.
 
Old 09-29-2015, 01:20 AM   #11
SlimeQ
LQ Newbie
 
Registered: Jun 2008
Posts: 4

Rep: Reputation: 0
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?
 
Old 09-29-2015, 02:59 AM   #12
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,882

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
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?
 
Old 09-29-2015, 03:58 AM   #13
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368Reputation: 2368
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'.
 
Old 09-30-2015, 02:51 AM   #14
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Quote:
Originally Posted by SlimeQ View Post
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.
 
Old 10-02-2015, 05:48 PM   #15
goumba
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
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by descendant_command View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
apt-get autoremove, LIES!! BigglesPiP Debian 18 01-24-2009 12:22 PM
building deb - official way puts amarok in autoremove nowshining Linux - Software 2 09-10-2008 01:32 PM
Significant change caused by apt-get-autoremove, new package, or full disk- which? sonichedgehog Debian 0 02-06-2008 07:36 PM
Autoremove question mikieboy Debian 1 08-27-2007 03:52 PM
"apt-get autoremove" in Debian Etch/Sid available? deepclutch Debian 1 12-27-2006 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:41 AM.

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