You really shouldn't have partitioned your hard drive that way. You partition it that way when you'll have a few system files and applications accessible to all users on one small partition (/
) and per-user data on the other very large partition (/home
). In other words, it's for standard desktop use.
You have a MySQL server that stores huge database files, which don't fit anywhere in that scheme. In other words, you have a server that's not run by a particular real user, not purely a standard desktop.
You should probably repartition, either to merge the /
and /home
partitions (the best option to avoid this sort of thing) or to increase the proportion allocated to the /
partition.
With that out of the way, use BleachBit.
Use BleachBit from the Universe repository:
Turn off MySQL
Open up a terminal (press Ctrl+Alt+T) and run the following:
sudo service mysql stop
Free up some space by removing unneeded and still-packed software and by removing archived log files:
Open up a terminal and run the following:
sudo -i
apt-get autoremove --purge
apt-get autoclean
apt-get clean
rm -rf /var/cache/apt/archives/*
find /var/log -name '*.gz' -delete
Turn on the Universe repository through Synaptic Package Manager
- Open Synaptic Package Manager.
Settings
menu > Repositories
.
- Make sure
Community-maintained free and open-source software (universe)
is checked.
- Click
Close
.
- Exit Synaptic Package Manager.
Fix things because you're using an unsupported release (12.10)
- Only follow this section if you're using a release that's so old that it's no longer supported.
Open up a terminal and run the following:
sudo nano /etc/apt/sources.list
Replace everything that has the pattern http://whatever/ubuntu
with http://old-releases.ubuntu.com/ubuntu
.
- Press Ctrl+O, Ctrl+X to save and exit.
Install BleachBit
Open up a terminal and run the following:
sudo -i
apt-get update
apt-get install bleachbit
Run BleachBit as root
- Open the applications menu (press Alt+F1).
System Tools
menu > BleachBit (as root)
.
- Clean a bunch of stuff.
Turn on MySQL
Open up a terminal and run the following:
sudo service mysql start
df -BM
isdf -h
, which will choose an appropriate human-readable unit for each figure. – Darael Nov 20 '15 at 12:17sudo du -h --max-depth=1 /
to begin with and then dig into the directory that takes up the most space for example:sudo du -h --max-depth=1 /var
– variona Dec 23 '15 at 07:44