Free up spaces on Ubuntu machine

This is a follow up post after upgrading the ubuntu on my eeepc. I found that I only have a few hundred megabytes left on my netbook. The space can be checked by running a command: df

Of course, I’m a nerd. I love using Terminal — nah not really. It’s just that from time to time I always find myself struggling with finding the buttons that I want. So, I perfer using the commandline way of doing things.

Ok, let’s go back to our topic of freeing up some spaces. Firstly, I cleaned apt cache by running this command:

sudo apt-get autoclean

But, that’s not really enough so I did:

sudo rm -rf /var/cache/apt/archives/*.deb

This line is used to remove the unnecessary files that we don’t need after installation.

Then I removed everything from /tmp because I believe that it’s under /tmp, which mean temporary. I should be able to remove it without any problem. (Please don’t trust me entirely lol)

sudo rm -rf /tmp/*

Then I removed a few applications that I have never used to save a few hundred megabytes, such as, thunderbird, evolution, games and so on. Most applications can be removed by:

sudo apt-get autoremove APPLICATION NAME

For example, sudo apt-get autoremove evolution.

At the end I’m pretty happy with the result and nothing has crashed yet, which is great. Please feel free to try it and let me know how happy you are when getting a few hundreds MBs back.

Advertisements

Upgrading Ubuntu on EEEPC

I have an old EEEPC running ubuntu 8.10. I spent a lot of time seeking for a method to perform in order to upgrade it to the current version of ubuntu, which is 9.10. The only problem that I found is I don’t have enough space to perform an upgrade. After spending a few hours researching, here is a list of steps that I’ve done:

1. Download ubuntu alternate iso images for 9.04 and 9.10
2. Find a thumbdrive, something like 1GB will work just fine
3. Copy the image to the thumbdrive, start with 9.04
4. Plug it into a netbook, in my case it’s a 4GB eeepc
5. Open a Terminal. If you can’t find it, it’s under Applications > Accessories > Terminal
6. Type:

sudo mount /path/to/file.iso /cdrom -o loop

In my case, it was: sudo mount /media/UNTITLED/ubuntu9-4.iso /cdrom -o loop
(If you noticed my laziness on the thumb drive name, it’s a yes, I don’t bother renaming my thumb drive after formatting)
7. Perform an upgrade with a little trick by running this command

sudo /cdrom/cdromupgrade

8. Follow the usual upgrade steps

9. Remove the “cdrom” from apt sources.list

sudo vi /etc/apt/sources.list

10. Repeat [3] for ubuntu 9.10

Ok, there is the explanation of what it does:
Since there is not enough space on my netbook, I decided to perform and upgrade based on CD. However, this funky netbook does not have a CD rom or DVD and I don’t want to spend a few bucks on an external DVD. Therefore, I mount the usb image as an actual CD rom on the system. Yes, it’s pretty neat 🙂 Then I go to my “virtual CD rom” and perform an upgrade.