[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: freeing up some space



On Tue 11 Jan 2022 at 23:11:21 (+0000), Brian wrote:
> On Tue 11 Jan 2022 at 19:58:55 +0000, Andrew M.A. Cater wrote:
> > On Tue, Jan 11, 2022 at 01:25:27PM -0500, Roy J. Tellason, Sr. wrote:
> > > So I'm poking around with mc,  and happened across /var/cache/apt/archives which has a LOT of *.deb files in it, and which seems to include many versions of the same package,  some of them many years old,  going all the way back to 2013.  I guess I've been running debian a little longer than I'd thought...
> > > 
> > > Is it okay to just delete older versions of these files?  Or should I be doing something using one of the package management tools?  I've mostly used synaptic,  but am also aware of apt-get,  apt,  aptitude,  and am not real clear on their comparative capabilities.
> > 
> > apt-get clean is a fairly useful command.
> 
> Indeed it it is. But what useful function does it perform on a default
> installation? Some users appear to think that downloaded and installed
> packages are preserved in /vat/cache/apt/archives until they are cleared
> out. They are not.

Eh?

~# ls -l /var/cache/apt/archives/
total 4
-rw-r----- 1 root root    0 Dec 12 21:09 lock
drwx------ 2 _apt root 4096 Dec 29 17:43 partial
~# apt-get -o Acquire::http::Proxy="http://192.168.1.14:3142/"; install iwd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  iwd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 561 kB of archives.
After this operation, 2232 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 iwd amd64 1.14-3 [561 kB]
Fetched 561 kB in 0s (3079 kB/s)
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Selecting previously unselected package iwd.
(Reading database ... 347571 files and directories currently installed.)
Preparing to unpack .../archives/iwd_1.14-3_amd64.deb ...
Unpacking iwd (1.14-3) ...
Setting up iwd (1.14-3) ...
Processing triggers for dbus (1.12.20-2) ...
Processing triggers for man-db (2.9.4-2) ...
Scanning processes...                                                                               
Scanning processor microcode...                                                                     
Scanning linux images...                                                                            

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.
~# ls -l /var/cache/apt/archives/
total 556
-rw-r--r-- 1 root root 561296 May  6  2021 iwd_1.14-3_amd64.deb
-rw-r----- 1 root root      0 Dec 12 21:09 lock
drwx------ 2 _apt root   4096 Jan 11 17:18 partial
~# 

That's why my routine upgrade command is:

# apt-get -o Acquire::http::Proxy="http://192.168.1.14:3142/"; update && apt-get -d -o Acquire::http::Proxy="http://192.168.1.14:3142/"; upgrade; apt-get upgrade; read -p 'Ctrl-C to avoid clean' _; apt-get clean

Cheers,
David.


Reply to: