Freeing up space on Raspberry Pi.

This is the shell script to execute. Brings back memories of symbolic directories. Also ran the cmd to force the cache directory to be on a larger filesystem. In my case apt-get -f -o dir::cache=/home/user/MyDocs/apt-archive-cache [cmd]

I don’t miss Unix admin at all (GEEK!!)

#!/bin/sh
# Script to free up space on rootfs

# Moving ?? icons to /home/opt
mkdir -p /home/opt/usr/share/icons 2> /dev/null
cp -r /usr/share/icons/* /home/opt/usr/share/icons
rm -r /usr/share/icons
ln -s /home/opt/usr/share/icons /usr/share/icons

# Moving video on start-up to /home/opt
mkdir -p /home/opt/usr/share/hildon-welcome 2> /dev/null
cp -r /usr/share/hildon-welcome/* /home/opt/usr/share/hildon-welcome
rm -r /usr/share/hildon-welcome
ln -s /home/opt/usr/share/hildon-welcome /usr/share/hildon-welcome

# ??
mkdir -p /home/opt/usr/share/pixmaps 2> /dev/null
cp -r /usr/share/pixmaps/* /home/opt/usr/share/pixmaps
rm -r /usr/share/pixmaps
ln -s /home/opt/usr/share/pixmaps /usr/share/pixmaps

# Moving ‘apt cache’ to /home/opt – Valid until [https://bugs.maemo.org/show_bug.cgi?id=5746 Bug 5746] is fixed.
mkdir -p /home/opt/var/cache/apt 2> /dev/null
cp -r /var/cache/apt/* /home/opt/var/cache/apt
rm -r /var/cache/apt
ln -s /home/opt/var/cache/apt /var/cache/apt

# Moving locales [http://talk.maemo.org/showpost.php?p=568370&postcount=11 Source]
mv /usr/share/locale /opt
ln -s /opt/locale /usr/share/locale

Advertisements

One thought on “Freeing up space on Raspberry Pi.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s