How to empty trash?

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. 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. I thought no
problem I would just get rid of the data I just copied. Not having much
experience with Ubuntu I just sent the data to trash and then tried to empty
the trash. That does not work as I found out as the system needs disk space to
empty the trash and there is none available. 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?


Re: How to empty trash?

By Peter Flynn at 05/14/2018 - 18:10

On 14/05/18 19:13, Bob wrote:
Not sure I understand that, but carry on.

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

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.

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

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).

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.


Re: How to empty trash?

By Liam Proven at 05/14/2018 - 17:38

Well, there are several possible ways.

Firstly: do you have another copy of your backed-up stuff?

Secondly: is there a subset of the stuff you transferred you could delete
to save some space without losing everything? E.g. just the downloads


* boot off the live DVD/USB you used to install the laptop. Pick "try
Ubuntu". It will load to the desktop and you can use that to browse through
the files on the hard disk and selectively delete stuff.

* How big is the laptop HD? Is it totally full? If not, GParted (on the
live DVD/USB) might let you shrink your root partition and expand /home a
bit -- or if you don't have a separate /home, expand the Ubuntu partition a

Neither of those work?

* Command line way -- works but a high risk of disaster.

Where did you put the stuff you copied? Is it all in a single subdirectory
of your home folder?

E.g. if your user account was called bobb, it might be in

You could boot the machine, but *not log in*.

When it's at the login screen, press Ctrl-Alt-F1.

You can log in there. Same username and password.

Then type:

cd /home/bobb

(or whatever your username is)

That puts you in your home directory.


cd transfer

To move into the directory of stuff you transferred.

Make sure the prompt now says:


or whatever username@computername:~/yourfolder is.

(If you didn't put it all in 1 folder, if it's in Documents and Pictures
and Music and so on, do them one by one.)

Then if you wanted to get rid of everything, type, very carefully so you
make no mistake:

rm -rf *

If you can just delete 1 big file, that'll give you room to empty the bin...


cd /home/bobb
cd transfer
rm windows10.iso