[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to empty trash?

On 14/05/18 19:13, Bob wrote:
> Being a fairly new user to Linux/Ubuntu I did a stupid thing and do
> not know how to get out of it.  I have a new laptop that I am trying
> to set up as a replacement of an old laptop.  I copied a my home
> directory from a desktop that had an upgrade fail to the new laptop
> as backup before trying to recover the desktop. 

Not sure I understand that, but carry on.

> I did not check the amount of space needed and the laptop did not
> have enough space so the /home partition ran out of space. 

The *new* laptop didn't have enough space? That's pretty unusual, I 
would think.

> I thought no problem I would just get rid of the data I just copied.

Can I see if I have understood this right:

a. you copied your home directory from the old laptop to the new one
    (but where did you put it, ie what directory did you copy it to?)

b. you then copied it all over again, this time to /home/bob or
    whatever, and it ran out of space while doing this.

> Not having much experience with Ubuntu I just sent the data to trash 

What data did you send to the Trash? The original copy (a) or the failed 
copy (b)?

 > and then tried to empty the trash.

The problem with Trash is that it's misleading (on all systems). It's 
just a directory, so it takes up exactly the same amount of space as 
what you move into it, resulting in zero saving of disk space (actually 
slightly worse, because on some systems it also stores the directory 
that each file came *from* so they could be restored).

> That does not work as I found out as the system needs disk space to
> empty the trash and there is none available.
Right. The solution to this is to find out where the Trash directory is, 
and delete its contents from the command line. The name of the Trash 
directory varies from system to system. I never use it, so I have no 
idea where it is in Ubuntu, but if the designers had any sense it would 
be /home/bob/Trash.

Find out where it is, and then do as Liam suggested, eg:

cd /home/bob/Trash
rm -rf *

The rm command deleted files immediately and there is NO RECOVERY. It's 
dangerous if you are not 100% certain that these are the files you want 
to delete, but for many people it's the normal way of working. The -r 
option makes it recurse into subdirectories, and the -f option means 
"force", ie just do it and don't ask questions.

> To make things worse now that /home has no space I get logged off
> after about 1 1/2 minutes so I have not been able to do much
> experimenting in that amount of time.
> So how do I empty the trash and get the disk space back?
Liam's method should work, but please let us know success or failure.