# Ran out of space during upgrade



## DoYouSpeakWak (Oct 11, 2013)

Hey FreeBSD users. 

Today I ran the upgrade from 9.1 to 9.2 on one of my servers. Sadly there was not enough harddrive space and the upgrade failed right after I was asked to edit my ssh config file. The plan is to migrate the server, but for now I wish to just get it back online. But I think that requires a delete of the downloaded files from the upgrade. Please correct me if I'm wrong. 

How do I do that?


----------



## ph0enix (Oct 11, 2013)

What upgrade method did you use?  The more details the better.


----------



## DoYouSpeakWak (Oct 11, 2013)

Thanks very much for your reply. I did the following. 


```
freebsd-update fetch
freebsd-update install
freebsd-update upgrade -r 9.2-RELEASE
```

dh -f command output afterwards

```
root@relay:/root # df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ada0p2    4.4G    4.1G    -41M   101%    /
devfs          1.0k    1.0k      0B   100%    /dev
```


----------



## junovitch@ (Oct 12, 2013)

```
freebsd-update fetch
freebsd-update install
```

This would have updated you to the latest patch level of 9.1-RELEASE.  It wasn't really required since you were upgrading immediately after.


```
freebsd-update upgrade -r 9.2-RELEASE
```

This step downloads all the updates and preps files for merging.  Everything I believe resides in /var/db/freebsd-update.  Nothing gets committed to disk until `freebsd-update install` is used in the next step so it should be safe to remove that directory to reclaim space.


----------



## Erratus (Oct 12, 2013)

You need to identify the fat grown directories in your tree.

Check /usr and /var like this:


```
#!/bin/sh
echo "Size [MB] of directories in $1 ..."
find $1 -maxdepth 1 -type d -exec du -shm {} \; | sort -n
```


----------



## DoYouSpeakWak (Oct 13, 2013)

Thanks for the advice. 

I found the files to be in /var/db/freebsd-update/files.

There I had to detele all the *.gz files. I used the `du -h` command instead.


----------

