(SOLVED) Re: Cleaning out an archive ?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
NotSo
Level 2
Level 2
Posts: 51
Joined: Sun Apr 16, 2017 6:14 pm
Location: Lazing on Lamb, QLD AUSTRALIA

(SOLVED) Re: Cleaning out an archive ?

Post by NotSo »

Not sure if I have the right section here.
I have been following and reading about the Mint 19 release in this forum, and saw this bit of info but I am not sure how to clean out the archive.
How much stuff is accumulating in /var/cache/apt/archives ? Mine needs cleaning up again. Got rid of about 4 or 5 GB last clear out.
I checked mine and I have over 6 GB
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Image
Linux Mint user since 2016.
LM 21.1 Cinnamon 64-bit. (I keep coming back)
User avatar
Moem
Level 22
Level 22
Posts: 16235
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Cleaning out an archive ?

Post by Moem »

Mod note:
Moved this out of the Chat section because it's clearly a support question.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
User avatar
NotSo
Level 2
Level 2
Posts: 51
Joined: Sun Apr 16, 2017 6:14 pm
Location: Lazing on Lamb, QLD AUSTRALIA

(SOLVED) Re: Cleaning out an archive ?

Post by NotSo »

I just right clicked in the folder and selected "Open as root", my password, and deleted the files.
Image
Linux Mint user since 2016.
LM 21.1 Cinnamon 64-bit. (I keep coming back)
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: (SOLVED) Re: Cleaning out an archive ?

Post by karlchen »

The right manual way of doing so, however, would have been

Code: Select all

sudo apt-get clean
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
NotSo
Level 2
Level 2
Posts: 51
Joined: Sun Apr 16, 2017 6:14 pm
Location: Lazing on Lamb, QLD AUSTRALIA

Re: (SOLVED) Re: Cleaning out an archive ?

Post by NotSo »

Thank you karlchen for your reply.

Would I open the folder in the terminal and enter the command? I tried it and it left a "lock" file there, is that right?

Just trying to learn some terminal stuff :D

I keep little bits of info like that in a text file for reference later.
Image
Linux Mint user since 2016.
LM 21.1 Cinnamon 64-bit. (I keep coming back)
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: (SOLVED) Re: Cleaning out an archive ?

Post by karlchen »

Hello, NotSo.

You do not have to change to /var/cache/apt/archives, before executing sudo apt-get clean. apt-get knows its directory structure.
It is the intended behaviour of sudo apt-get clean that it clears everything from /var/cache/apt/archives except
+ the lock file
+ the sub-directory /var/cache/apt/archives/partial.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
NotSo
Level 2
Level 2
Posts: 51
Joined: Sun Apr 16, 2017 6:14 pm
Location: Lazing on Lamb, QLD AUSTRALIA

Re: (SOLVED) Re: Cleaning out an archive ?

Post by NotSo »

Thank you so much Karl, my learning curve is growing nicely with interesting info like that.

Have a good day :)
Image
Linux Mint user since 2016.
LM 21.1 Cinnamon 64-bit. (I keep coming back)
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: (SOLVED) Re: Cleaning out an archive ?

Post by karlchen »

Good morning, NotSo.

A note on automatic cleanup of the apt cache:

On Ubuntu /var/cache/apt/archives will be cleaned automatically, depending on the rules defined in the apt config file /etc/apt/apt.conf.d/20archive.
The default (?) settings seem to be to clean anything from /var/cache/apt/archives which has been present there for more than 30 days and to keep the total size of cached files below 500 MB.
This has worked nicely so far on all of my Ubuntus, including Ubuntu 16.04 and 18.04.

As Linux Mint is based on Ubuntu, the same automatic housekeeping has worked fine and still works fine on Linux Mint here up to version 17.x.
On Mint 18.1, however, for some reason or just by accident this automatic housekeeping seems to be disabled by default.
At least here one my Mint 18.1 (2 systems), I had to enable it myself.
Ever since, on Mint 18.1, too, apt makes sure that /var/cache/apt/archives will not keep on growing indefinitely, but that it gets cut down to below 500 MB in a timely fashion.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
NotSo
Level 2
Level 2
Posts: 51
Joined: Sun Apr 16, 2017 6:14 pm
Location: Lazing on Lamb, QLD AUSTRALIA

Re: (SOLVED) Re: Cleaning out an archive ?

Post by NotSo »

The file below does not exist in the folder ... hhhmmm. That's why I suppose that the archive folder had over 6GB of stuff in it. Never mind, Mint 19 is just around the corner.
depending on the rules defined in the apt config file /etc/apt/apt.conf.d/20archive
Image
Linux Mint user since 2016.
LM 21.1 Cinnamon 64-bit. (I keep coming back)
Locked

Return to “Other topics”