How do I delete images from the server? My droplet has been blocked for copyright infringement and can only be accessed by the console

July 21, 2017 1.4k views
WordPress Ubuntu 16.04

My droplet was blocked because it contained some images that I do not have copyright, these images were posted on my wordpress blog and now I have to remove them.

But as my droplet was blocked I can only access the console and I do not know the commands that I must type to be able to remove such images, could anyone help me?

Example of one of the images:


3 Answers

Searching the internet I found the command “ rm ” but I still could not remove

I tried the following on the console
rm ANNBI-zoom-696x1088-1.jpg

And it did not work,

So I tried

root@myblog: cd /var/www/html/wp-content/uploads

root@myblog: /var/www/html/wp-content/uploads# rm ANNBI-zoom-696x1088-1.jpg

And it did not work either.

what should I do?

Hi @fernando2i

This command will list files starting with ANNB in your WordPress uploads folder:

ls -l /var/www/html/wp-content/uploads/ANNB*

Otherwise try running this command, which will search for the file ANNBI-zoom-696x1088-1.jpg within your WordPress uploads and delete the file:

find /var/www/html/ -name "ANNBI-zoom-696x1088-1.jpg" -exec rm {} \;

It’s very important that you use big/small letters correctly.

  • I’m trying to run the second command you passed me but the following appears:

    find: missing argument to ’-exec’

    What am I doing wrong?

    • @fernando2i

      The problem is that you cannot copy-paste anything and it’s difficult to input some characters into the web console. And it has to be precisely as stated, otherwise it won’t work.

      What do you get with the first command?


Yes, it shows all files starting with ANNB not ANNIB
But I guessed the other pictures starting with ANNB was also copyright infringements.

It might be easier if you just rename the upload folder, then tell support to get the droplet back online, and then use your regular file manager to delete all infringements before renaming upload folder back.

cd /var/www/html/wp-content/
mv uploads uploads2
  • I’ll do it then.

    Maybe they release my droplet after this procedure

    Thanks for the help, as soon as i have the answer i send a feedback

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!