0

I can't do a software update because /boot is almost full. I, as root deleted unneeded files, but it didn't change the space problem. Trash shows that it's empty, and I can't get run gksudo nautilus to access roots trash to empty it. So basically, I can't do any more upgrades if they involve /boot.

How do I empty root's trash?

Grammargeek
  • 2,762
Darby Gallagher
  • 89
  • 1
  • 1
  • 6

3 Answers3

0

Try this:

Open a terminal,

Press Ctrl+Alt+T

Run it:

$ sudo -i
# OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
# CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
# LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
# METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
# OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
# apt-get clean
# apt-get remove --purge $OLDCONF
# apt-get remove --purge $OLDKERNELS
# rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
# rm -rf /root/.local/share/Trash/*/** &> /dev/null
kyodake
  • 15,401
0

/boot usually fills up because Ubuntu keeps old kernel versions around in case the new ones fail, so that you can go back to a working kernel. You'll need to delete old kernel versions to free up space on /boot.

Automatic method

  1. Reboot to ensure you're using the latest kernel version.
  2. Follow the instructions to use Ubuntu Tweak to remove old kernel versions (scroll down to the Ubuntu Tweak section).

Manual method

  1. Reboot to ensure you're using the latest kernel version.
  2. Open a terminal by pressing Ctrl+Alt+T.
  3. Find out what kernel version you're using:

    uname -r
    
  4. Type the following and press tab twice instead of enter:

    sudo apt-get purge linux-
    
  5. In the output, find a kernel version other than what you're using. For example, if your kernel version is 3.19.0-22 and you see linux-headers-3.19.0-21, you can remove version 3.19.0-21.

  6. Remove linux-headers-VERSION, linux-headers-VERSION-generic, linux-image-VERSION-generic, and linux-image-extra-VERSION-generic. For example, if you're removing version 3.19.0-21, run:

    sudo apt-get purge linux-headers-3.19.0-21 linux-headers-3.19.0-21-generic linux-image-3.19.0-21-generic linux-image-extra-3.19.0-21-generic
    
  7. Go back to step 4 and repeat until you only see the kernel version you're using.
Olathe
  • 4,240
  • I did this and now only have the kernel I am currently using. However, I have not changed the fact that /boot drive is still mostly full. I need (I think) to somehow get the root users trash to empty, and I can't seem to. – Darby Gallagher Jul 07 '15 at 01:44
  • Why do you think trash is stored in /boot? – Olathe Jul 08 '15 at 12:34
-1

According to this topic the root's trash has to be in `/root/.local/share/Trash'

Just open a terminal and type (after sudo -s enter your password, no characters will be shown):

sudo -s
rm -rf /root/.local/share/Trash

It's going to delete the Trash folder too.

aastefanov
  • 1,391
  • 12
  • 16