How to remove un-necessary software from your Raspberry pi server.

Sean King
2 min readFeb 15, 2017

--

In this section we are going to attempt to create a ‘headless’ server. What this means is that we are going to remove any un-necessary software. As raspbian comes with a lot of educational software by default it is a good idea to free up some space. The following steps should free up about 2.5 gb worth of space from your sd card.

We could delete each piece of software manually but that would be time consuming and tedius. I have taken the following piece of advice from this blog post. What we are going to do is run a command that downloads and runs a script from github that will automatically delete certain useless software from the operating system such as ‘wolfram alpha’ and other educational overheads.

Type the following in the terminal:

sudo cp /etc/network/interfaces /etc/network/interfaces.bakwget https://gist.githubusercontent.com/samatjain/4dda24e14a5b73481e2a/raw/5d9bac8ec40b94833b4e9938121945be252fdee1/Slim-Raspbian.sh -O Slim-Raspbian.shsh ./Slim-Raspbian.sh | sudo sh

This may take awhile. On my system it took over 20 minutes. Feel free to read the next few steps while you’re waiting.

Once that has completed we are going to manually remove libreoffice as it was not included in the script above.

sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove

Next we are going to remove any un-needed packages that have been installed as dependencies for software we no longer have installed. We do this with the following command.

apt-get autoremove

Next we are going to update and upgrade the software we currently have installed on the system. Source.

First, update your system’s package list by entering the following command in LXTerminal or from the command line:

sudo apt-get update

Next, upgrade all your installed packages to their latest versions with the command:

sudo apt-get dist-upgrade

This may take awhile. It took almost an hour for me. Grab a coffee and read some of my other tutorials.

--

--