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.
|
|
09-07-2009, 10:10 PM
|
#1
|
LQ Newbie
Registered: Nov 2008
Posts: 2
Rep:
|
How to prevent apt from deleting packages in /var/cache/apt/archives ?
In the name of God
Hi
A)Is there a configuration item that prevents apt from
deleting files in /var/cache/apt/archives ?
B)When apt removes some packages in /var/cache/apt/archives ?
Thanks in advance.
|
|
|
09-08-2009, 02:50 AM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
|
The apt system would not usually remove packages from the cached archive unless you pass the 'clean' parameter to apt-get or aptitude. It is not uncommon to have multiple versions of the packages in the cache as you go through upgrades.
There are some options that can be put into the /etc/apt/apt.conf file to control when and how files are cleaned from the archive (see 'man apt.conf').
|
|
|
09-08-2009, 11:02 AM
|
#3
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Rep:
|
Quote:
Originally Posted by abc.linux
In the name of God
Hi
A)Is there a configuration item that prevents apt from
deleting files in /var/cache/apt/archives ?
B)When apt removes some packages in /var/cache/apt/archives ?
Thanks in advance.
|
if you do :
you remove them.
If you does not that, they remain.
In case it does by itself ,there is something ... ?
|
|
|
09-09-2009, 01:25 PM
|
#4
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
I also would like to accumulate packages in my ubuntu 8.04.3 system's /var/cache/apt/archives to speed any re-installation.
/bin/ls -ltc /var/cache/apt/archives lists files dated from 15jul9 to 7sep9. I have not used apt-get or aptitude with the clean option. Searching the system log I cannot find anything that might have deleted files up to the start date. Old packages seem to be auto-deleted ... ?
|
|
|
09-09-2009, 01:41 PM
|
#5
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Rep:
|
Quote:
Originally Posted by catkin
I also would like to accumulate packages in my ubuntu 8.04.3 system's /var/cache/apt/archives to speed any re-installation.
/bin/ls -ltc /var/cache/apt/archives lists files dated from 15jul9 to 7sep9. I have not used apt-get or aptitude with the clean option. Searching the system log I cannot find anything that might have deleted files up to the start date. Old packages seem to be auto-deleted ... ?
|
you can create even your own server of deb for apt-get , for updating ur sources.list
its quite useful
|
|
|
09-09-2009, 02:15 PM
|
#6
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
Quote:
Originally Posted by frenchn00b
you can create even your own server of deb for apt-get , for updating ur sources.list
its quite useful
|
Thanks frenchn00b
Nice idea if we had more than one .deb machine on this otherwise Windows-only LAN! Being as how it's only for one machine I'd be happy if I could find out how to stop ubuntu cleaning /var/cache/apt/archives and simply back it up to DVD at regular intervals.
Or have I misunderstood something?
|
|
|
09-09-2009, 03:25 PM
|
#7
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Rep:
|
Quote:
Originally Posted by catkin
Thanks frenchn00b
Nice idea if we had more than one .deb machine on this otherwise Windows-only LAN! Being as how it's only for one machine I'd be happy if I could find out how to stop ubuntu cleaning /var/cache/apt/archives and simply back it up to DVD at regular intervals.
Or have I misunderstood something?
|
Do you know a good ftp provider?
ie. freeshell is really great.
It has unix and website, you can put also your own deb when u compile on that, and you update ur sources.list
|
|
|
09-09-2009, 03:40 PM
|
#8
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
Quote:
Originally Posted by frenchn00b
Do you know a good ftp provider?
ie. freeshell is really great.
It has unix and website, you can put also your own deb when u compile on that, and you update ur sources.list
|
But wouldn't it take just as long to pull .debs in from a remote FTP site as to download them from the standard repositories? I'm not thinking about custom .debs (or so few they are not an issue); I'm thinking about speeding up re-installation by avoiding having to download lots of packages over a not-so-fast Internet connection.
|
|
|
09-09-2009, 10:15 PM
|
#9
|
LQ Newbie
Registered: Nov 2008
Posts: 2
Original Poster
Rep:
|
Quote:
Originally Posted by neonsignal
The apt system would not usually remove packages from the cached archive unless you pass the 'clean' parameter to apt-get or aptitude. It is not uncommon to have multiple versions of the packages in the cache as you go through upgrades.
There are some options that can be put into the /etc/apt/apt.conf file to control when and how files are cleaned from the archive (see 'man apt.conf').
|
Thanks,
I have no /etc/apt.conf
I think that I need to create the /etc/apt.conf file
containing the following lines:
DSelect
{
Clean "never";
};
I got these lines from /usr/share/doc/apt/examples/apt.conf .
I didn't test the result.
|
|
|
09-10-2009, 06:12 AM
|
#10
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
Quote:
Originally Posted by abc.linux
Thanks,
I have no /etc/apt.conf
I think that I need to create the /etc/apt.conf file
containing the following lines:
DSelect
{
Clean "never";
};
I got these lines from /usr/share/doc/apt/examples/apt.conf .
I didn't test the result.
|
Looks interesting but when is DSelect used?
Don't know how similar ubuntu 8.04 is to Debian but I have these files in /etc/apt/apt.conf.d which may be relevant - 01autoremove
- 10periodic
Contents include APT::Periodic::AutocleanInterval "0";
- 20archive
Contents include
APT::Archives::MaxAge "30";
APT::Archives::MinAge "2";
APT::Archives::MaxSize "500";
|
|
|
11-07-2009, 09:32 AM
|
#11
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Quote:
Originally Posted by catkin
Looks interesting but when is DSelect used?
|
IIRC, apt-get is wrapper & the real work is done by either dselect or dpkg or both, I don't remember clearly.
Last edited by archtoad6; 11-08-2009 at 04:48 AM.
Reason: Add quote to clarify reason for post
|
|
|
11-07-2009, 11:46 AM
|
#12
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Rep:
|
Quote:
Originally Posted by catkin
But wouldn't it take just as long to pull .debs in from a remote FTP site as to download them from the standard repositories? I'm not thinking about custom .debs (or so few they are not an issue); I'm thinking about speeding up re-installation by avoiding having to download lots of packages over a not-so-fast Internet connection.
|
I have my /etc/fstab configured for NFS deb server, like debian.
thqt creqtes the server fo rserver qnd one with X:
Code:
echo "Hello Create from the pool the packages, from contrib and contribx"
echo " Type sources.list, to add and update your sources.list"
printf "Enter the distro name >"
read distroname
if [ "$distroname" == "sources.list" ] ; then
* echo "deb file:/home/debserver/ $distroname contrib" >> /etc/apt/sources.list
cat /etc/apt/sources.list
exit
exit
exit 0
fi
ls pool/
cd /home/debserver ; rm dists/$distroname/contribx/binary-i386/Packages ; mkdir -p dists/$distroname/contribx/binary-i386/ ; apt-ftparchive packages pool/contribx/ > dists/$distroname/contribx/binary-i386/Packages
#
and so on
|
|
|
All times are GMT -5. The time now is 02:11 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
|
|