How to clean /var/caches/apt/archives/ directory

Asked by Karthik. B

I allotted 1GB partition for /var directory. After updating system using synaptic package manager /var/caches/apt/archives is loaded with downloaded packages utilizing 59% of that partition. Even after those packages are successfully installed, those packages are still residing in that directory which may hinders updating the system in future. When will those cached packages will be removed? Is there any manual process to clear cached directories?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
jz (jz+) said :
#1

This command should accomplish exactly what you want...

sudo apt-get clean

Revision history for this message
Karthik. B (karthik-bhuvana) said :
#2

One thing I want to clear about this issue is that does this cleaning process won't occur automatically when all the downloaded packages are successfully installed while updating the system using synaptic package manager? Is there any harm if i apply the above said command "sudo apt-get clean" manually to clean up /var/cache/apt/archives directory?

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) said :
#3

No, it doesn't happen automatically. You can issue that command at any time with no harm other than any packages you have downloaded and NOT installed will need to be re-downloaded if you choose later to install them.

Can you help with this problem?

Provide an answer of your own, or ask Karthik. B for more information if necessary.

To post a message you must log in.