increasing use of disk storage with each update

Asked by DarnellH

I had clean re-install 8.10. Initially "df" showed 31% usage of /dev/sda1. After applying the 300+ updates to bring the 8.10 current, "df" reported 48% usage. The re-install was required because the attempt to update to 9.04 failed with "out of disk space" condition. At that time 'df' reported 100%. I tried deleting 50MB from my home dir and below home but 'df' report did not change.

Nothing of great size is in /tmp folder.

Question: After update is applied, how do I delete the modules/libraries that were replaced? Can I recapture my disk space?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Luis F. Lopez
Solved:
Last query:
Last reply:
Revision history for this message
João Rocha (joaoesperanco) said :
#1

All the downloaded updates are stored in /var/cache/apt/archives/

You can remove them all with (using terminal):
sudo rm *

Or even better, execute in terminal (autoclean - Erase old downloaded archive files):
sudo apt-get autoclean

If you execute:
sudo apt-get autoremove
It Removes automatically all unused packages

Revision history for this message
Best Luis F. Lopez (luis.lopez) said :
#2

run sudo apt-get clean on the console, that should get rid of the downloaded packages on /var/cache/apt/archives

Revision history for this message
DarnellH (mi-2k) said :
#3

Thanks.

I did the 'autoclean' and 'autoremove' and they did not remove much (1%). I did the 'clean' and it appears to be equivalent to 'rm *'. So now, I am down to 40%. Problem partially solved!

I am new to Linux after decades in Windows.

  Where should I go to understand how the update process works so that a newbie would know to purge the old packages?

  Am I correct in supposing that the old code is kept on the machine in case I want to revert and that once I am comfortable with the updated system the old code can be deleted?

Revision history for this message
DarnellH (mi-2k) said :
#4

I figure that what apt-get clean deleted was only the old archives from which the new code was extracted and put into service.

I don't expect to get back to 31% but is it correct to think that the replaced libs are still on my hard drive and are eligible for deletion? and how would I/the system identify them for deletion?

Revision history for this message
DarnellH (mi-2k) said :
#5

Thanks Luis F. Lopez, that solved my question.