LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-19-2011, 03:33 PM   #1
felixk
Member
 
Registered: Jul 2008
Posts: 60

Rep: Reputation: 15
Question Using "apt-get autoclean"?


The brief description of the autoclean routine reads:

autoclean - Erase old downloaded archive files

How do I ensure that "autoclean" leaves my downloaded (superceded) kernel images untouched?

For those who want more detail:

After the scheduled "dist-upgrade", I shall have both "Squeeze" and "Lenny" partitions on my box (belt-and braces approach!). When booting and selection my "root" directory, I want to be certain that I can continue to access the Lenny partition - at least until I know for sure that Squeeze works.

felixk
 
Old 03-19-2011, 04:04 PM   #2
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
`apt-get clean` or `apt-get autoclean` don't remove installed packages. They clean /var/cache/apt/archive from deb-files.
If you want to save some of them simply copy them to a save location before you run those commands
(it does not sound like that is what you want). You can install them with `dpkg -i *.deb`.

None of that has got something to do with being able to dual-boot Lenny and Squeeze
(you run those commands on Squeeze, and will still be able to boot both, but especially the other OS. You run those commands on Lenny, and will be able to boot both too).

There is the command `apt-get autoremove`. It would remove packages which were installed due to another package. You removed that package, for what reason ever, and apt-get autoremove will remove them now too.
The reason why they were installed is gone, and there is no need for them anymore.
Metapackages (like gnome) might lead to unexpected behaviour.

To remove a package you use `apt-get remove`.
As long you take care when running `apt-get autoremove' and don't remove a package with `apt-get remove` you should be save.
If you got enough space there is no need to run `apt-get autoclean` or `clean` atm.

I hope this or most of this is right. I think so, but would not bet on it.
If in doubt wait for other answers.

Last edited by j1alu; 03-19-2011 at 04:06 PM.
 
Old 03-19-2011, 04:24 PM   #3
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
from the man page:
Quote:
clean
clean clears out the local repository of retrieved package files.
It removes everything but the lock file from
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When
APT is used as a dselect(1) method, clean is run automatically.
Those who do not use dselect will likely want to run apt-get clean
from time to time to free up disk space.

autoclean
Like clean, autoclean clears out the local repository of retrieved
package files. The difference is that it only removes package files
that can no longer be downloaded, and are largely useless. This
allows a cache to be maintained over a long period without it
growing out of control. The configuration option
APT::Clean-Installed will prevent installed packages from being
erased if it is set to off.
 
Old 03-20-2011, 06:15 PM   #4
felixk
Member
 
Registered: Jul 2008
Posts: 60

Original Poster
Rep: Reputation: 15
Thumbs up

Quote:
Originally Posted by j1alu View Post
`apt-get clean` or `apt-get autoclean` don't remove installed packages. They clean /var/cache/apt/archive from deb-files.

SNIP

.
If in doubt wait for other answers.
Firstly, my thanks to both craigevil and to jlalu for taking the time to answer my query.

My worry was real. But I asked the wrong question(s).

The worry was:

Will my existing (Lenny) Kernel-image get removed (or marked as obsolete) automatically during the kernel upgrade that is part of the upgrade to Squeeze.

I went for broke and tried it.

And the answer is "no".

Since the old version of Kernel-imaage is still "installed" after the dist-upgrade, my reconfigured boot-loader (lilo) can still find all that it needs to boot into the my Lenny partition and "autoclean" will presumably respect the unchanged install-status of the old Kernel-image.

If I have missed something vital, I would be glad to be told (before I do my housekeeping and run "autoclean"), "autoremove" sounds too automated for me; I normally run "Orphaner" to identify packages that are no longer needed; it provides the chance to inspect what the orphaned package used to do.

Again, many thanks for the prompt replies.

felixk
 
  


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
unique password for "update" and "synaptic" and "apt-get" SaintDanBert Linux - Security 1 09-17-2010 04:53 AM
"dpkg error in --configure" in most all (508) programs after "apt-get dist-upgrade" fluffymuffins Debian 3 08-09-2010 03:47 AM
Is there an "apt-get" equivalent of "yum list available"? geeeeky.girl Linux - General 3 07-20-2008 08:40 PM
how to install the "packages that have been held back" when doing "apt-get upgrade&qu zero79 Debian 5 06-27-2004 08:19 PM
what to do about apt "suggestions" and "recommendations" Bruce Hill Debian 8 11-11-2003 06:17 AM

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

All times are GMT -5. The time now is 10:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration