Remove unnecessary media files using the WP Media Cleaner plugin. Freeing up space on your hosting, deleting unused images How to delete media files in WordPress

I apologize to my regular readers for this off-topic post. Everything below will be of interest only to WordPress website owners. I promise not to abuse this topic in the future. This is my first post on the topic of blogging in 3 years.

As usual, 3 years after I started blogging, I received sad news from my hosting:

There is less than ten percent of free disk space left on your account. Lack of space can lead to malfunctions of your websites and mail.

In three years I've reached my 2GB limit. In general, of course, we shouldn’t have waited for such warnings, but what’s done is done. I decided to remove unnecessary image thumbnails using plugins. After studying the Internet on this topic, I realized that the top search results are full of extremely low-quality posts. None of these posts fully addresses the problem, and some give downright harmful advice, indicating that the authors of the advice themselves do not understand this issue.

Firstly, you should look into your uploads folder and see how many thumbnails are created for each uploaded image. In my advanced case, it turned out that for each image I generated as many as 6 thumbnails of different sizes, and now there are more than 3000 photos on my site, so these previews clearly take up a colossal amount of space. All thumbnails are created in WordPress at the time of upload.

Alt/Prt/Scr Backup on my hosting, since I have already deleted the files

Of course I didn't need that many miniatures at all. In reality, I only used thumbnails of size 150X150 on the pages of categories and tags; for the “Media File Library” size of 150X150 is also quite enough.

There are only 3 sources for generating thumbnails, most often only the first one is mentioned.

  1. Thumbnail sizes are set in the menu Settings → Media files
  2. Thumbnail generation can be specified in the file functions.php
  3. Thumbnail generation can be set in plugins, which use images, for me it was the Manual Related Posts and Top 10 plugin, you may have other plugins.

The first point is the easiest to understand. Go to the appropriate menu item and zero out the sizes you don’t need.


If your uploads folder contains sizes that are not specified in the media file settings, then you should open the file functions.php and look there for lines containing: “ post-thumbnails", I found the following:

add_theme_support(‘ post-thumbnails‘);

You need to first think about whether you need these sizes. If you think that they are not needed, carefully comment out all such mentions. If you comment incorrectly, you can get a Fatal error.

If after this step there are still unnecessary thumbnail sizes, then it’s worth analyzing plugins that use images or can use thumbnails. It may be worth removing such plugins.

Various slideshows are especially insidious; as a rule, a slideshow uses 5-10 slides, and large previews are generated for all uploaded images. In my opinion, it is too much luxury to store 3000 miniatures on the server in order to use only 10 of them. These 10 essentials are best done by hand. But here they say, it's a matter of taste.

My Top10 plugin generated a thumbnail for each uploaded image, although in reality I only used 10 of them, i.e. plugins are insidious and eat up server space in huge chunks. Perhaps all this is due to the fact that thumbnails in WP are created during the upload of the image; if they were created only at the time of the first request for the image, then there would not be such a problem. This is just from thinking about the shortcomings of WordPress.

In plugins you should also search by autosearch using the words “ post-thumbnails“if you still want to use the plugin, but do not want to use images in its functionality. When updating the plugin, this operation will have to be repeated.

If the result is satisfactory, then you can move on to the next stage.

How to remove unnecessary thumbnails

It is important to understand that thumbnails are not only generated in folders on your server, for each thumbnail an entry is made in the site's database, so simply deleting the thumbnail files in the uploads folder on your server is not a good idea. Thumbnails are also used in the “Media File Library” and in the “Record Thumbnail”; if deleted incorrectly, you can get the following sad picture.



When deleting files, previews disappeared

The original photos themselves are intact, I deleted only the 300x199 thumbnails and the thumbnails stopped showing in the media library. In fact, 150x150 thumbnails are quite suitable for this purpose, but by default the media library displays medium-sized images.

Therefore it is better to use a plugin Thumbnail cleaner, it will remove all the thumbnails and after that you will generate a new lightweight set of thumbnails using the plugin Regenerate Thumbnails.

I've seen advice on the Internet like: "Paste this code into your functions.php file and run it once." And in the code only records from the database are demolished; this bad advice will not clear up significant space on your server. It is important to delete both the records in the database and the files on the server. And then generate it all again in a reduced quantity.

It is also important to understand that if you have a lot of pictures this process will create a significant load on the server, it is better to do it at night or on days when traffic to your site is least, for example on Saturday. Well, you generally need to understand what kind of load the hoster can forgive you without shutting down your site.

Naturally, you need to make a Backup of the uploads and database folders, just in case of emergency, but it is better without the help of the Thumbnail cleaner plugin, so as not to load the server, which will have to work without this operation.

In total I had about 3000 photos and a plugin Thumbnail cleaner, counted about 14,000 thumbnails, the plugin coped with the demolition in 2 minutes.

Generating new thumbnails using a plugin Regenerate Thumbnails took a full 30 minutes. And the next morning I received an abusive letter from Sweb stating that I had violated the terms of our agreement and exceeded the load on the server allowed to me. But fortunately Sweb limited itself to only this letter. Below you can estimate how much the server load has increased as a result of my operations.

DNUI Delete not used image plugin

Before doing all of the above, I tried to use the plugin DNUI Delete not used image, but alas, the experience was unsuccessful. For two days, March 16 and March 17, I tried to experiment with this plugin, this is noticeable by the increased load on the server. DNUI Delete not used image demolished the 150x150 thumbnails I needed, as a result, the pages of categories and tags lost their pictures, I had to restore them from Backup.

In total, I cleared 700MB on my server, not bad at all! It may be enough for another year ahead, before moving to the next tariff.

What else can eat up disk space?

Some plugins can write logs and never delete them.

For three years on my site Total Cache recorded more than 1 MB of logs!!! It is impossible to disable their generation from the admin panel; they can only be demolished via FTP. If you use Total Cache, look at how much the contents of this /wp-content/cache/log/000000 folder weighs, it is possible that after clearing it you will not have to bother with regenerating the preview.

iThemes Security writes 404 error logs, don’t forget to clear them periodically. Logs especially grow when a site is attacked.

Popular plugin Yoast SEO writes 404 error logs, it wouldn’t hurt to look there, analyze the contents and clear the logs. See what's in your Yoast SEO Search Console.

Many plugins download all possible language packs at the time of installation; all languages ​​you don’t need should be removed. Check what is in your folders:

/wp-content/languages/themes

/wp-content/languages/plugins

It is quite possible that there are language packs from themes and plugins you do not use.

Review your plugins for any language packs you don't need.

/wp-content/plugins/plugin name/lang(languages).

The popular Yoast SEO plugin writes logs of 404 errors, it wouldn’t hurt to look there, analyze the contents and clear the logs.

My immediate problem is the excessive load on the server; according to my tariff, processes on my site should take no more than 60 minutes of processor time per day. So far Sweb is tolerating me, but I would like to find a solution to this problem. I installed Total Cache a long time ago and it even works, but when I connected it, I didn’t notice a sudden decrease in the load, but I was expecting it. I don’t understand what’s the point of this plugin.

My workload is definitely not related to an attack on the server. During an attack, the load increases abruptly, this is not my case, it has been high for me for a couple of years and is correlated with attendance. In addition, I installed a security plugin, changed the admin login page, all password crackers are banned after the first attempt.

Of course, a dedicated server will solve this problem, but it costs much more than shared hosting. I don’t yet have the attendance and earnings to fork out that much. After all, many bloggers have traffic of 2000 and 3000 unique visitors, how do your servers withstand such a load, what hosting do you use? I would be grateful for your advice.

My experience using CDN (Content Delivery Network)

Attention, everything listed below happened two months after clearing space on the disk from unnecessary miniatures.

I waited for another malicious letter from my Sweb hoster. Due to the onset of the active tourist season, the traffic to my site has increased dramatically and the load on the server created by the processes on my site has reached a critical value of 120 minutes per day. Let me remind you that according to the contract, my site is supposed to consume only 60 minutes of processor time per day.

Sweb offered me to switch to another tariff costing only 800 rubles. per month!!! This inhumane amount did not suit me at all, now I pay only 120 rubles. per month, increase the price almost 6 times, this is robbery. As a result, the toad strangled me and I decided to try CDN from CloudFlare; in the end, I had no other choice.

CloudFlare has a free plan, which is what I signed up for. The biggest concern was the requirement to rewrite my DNS records on CloudFlare, but I did it, and as a result you can see in the graph that the load on the server has dropped significantly to a threshold that Sweb tends to forgive. I marked the moment of CDN connection with a green mark in the picture.

Of course, I expected more, I dreamed of seeing the figure 30 minutes a day, but this did not happen. CDN is a system of servers around the world to which your site is copied and when a request, for example coming from the USA, is answered by a server located in the USA and not in St. Petersburg, which should reduce the loading time of the site and at the same time this method reduces the load on my server.

In addition to the content delivery system, CloudFlare also offers protection against DOS attacks, analytics and minimization of html, css, and js. I disabled the minimizer from Total Cache because it generates an error, some of my texts are very long and it does not have enough 64MB of RAM to minimize html.

The free CloudFlare account has a number of limitations, which is quite natural. For one request, a visitor can download no more than 100MB from CloudFlare and the servers are updated within 24 hours. Those. if you sell a link, the buyer will not see it immediately, but within 24 hours.

Among the disadvantages of CloudFlare, I noticed the following:

  1. The Always Online feature does not guarantee that your site will be displayed if your own server goes down. Many Russian bloggers promised such a trick, but in reality it is not so. On the official CloudFlare website it is written that it does not save absolutely all the pages of your site, it saves the first 10 html pages of the site and only some links from them, you understand that this is negligible for a blog consisting of 400 pages. So when my server crashes, I see an error message from CloudFlare instead of my site.
  2. My site connected to CloudFlare is blocked for Internet connections using TOR. I noticed this while sitting on Facebook, where I recommended my site to people and some wrote to me that the page was not opening. What is typical is that when they visited my website via the mobile Internet, everything opened for them, everything opened for me, too, the site was working at that moment. It was a problem with the Internet connection.

The error message I see if my server is down
Analytics for October 2017

The load on the server increases significantly at the moment when I write an article, since my server is running in this case. I disabled the creation of revisions completely and even disabled the HeartBeat API, which automatically saves entries when writing an article and other functions necessary if there are several editors on the site. I'll watch.

In October 2017, another grief befell me. After updating WordPress and plugins, the load on the server has again increased significantly, despite the fact that now the traffic is less compared to July. The error logs on the server are clear. In general, this picture is quite typical when, after updating plugins, the load on the server increases.


I am exceeding my workload for July. My zone is blue.

I transferred the site to php7. It wasn't easy. At first, when I switched, instead of my site, I saw a white page with the inscription: “Error connecting to the database.” The hoster couldn't help me with advice, I had to figure it out on my own. It turned out I was using an outdated database connection. To update it, you just need to regenerate the database connection password and that’s it, but I spent 2 days looking for this solution.

After the switch, the load on the site began to go beyond reasonable limits, contrary to numerous predictions that it was simply bound to fall. A few more days of thinking and experimenting and I solved this problem. It turned out that in function.php of my theme I added ( based on advice from experienced webmasters on the Internet) function that contained an extra loop for a long time already. When working on php5.3 there was no overload, but after switching to php7 it just started to go off scale. When I fixed this problem, I finally saw my load in the blue zone.

Now I installed a couple of new plugins (WP-PostRating and SNAP|AutoPoster) and left it again.


Load for October. The spikes were caused by errors in function.php, they only appeared while working in the admin area, so it was difficult for me to find what was wrong

As for my thoughts on reducing the load, the following is relevant to me:

  1. Try replacing the Total Cache caching plugin with a plugin that saves bare html pages. Total Cache is not effective on shared hosting. Database caching doesn't work, it doesn't have enough RAM, the minifier doesn't work for the same reason. In reality, of the entire rich set of Total Cache, only page caching and browser caching work. Regarding caching of bare html, I am tormented by thoughts about what will happen with adding comments and how Google adsense will be displayed, how the rating will work.
  2. Try to create an AMP version of the site, if slow connections are loaded from Google, and not from my server, the load is simply bound to decrease. Here, of course, everything will depend on quantitative characteristics: the whole question is how many users per day will download the site from Google? And most of all, setting up this plugin also promises to be tedious.
  3. And now I am plagued by doubts about the correctness of my decision to demolish the unnecessary miniatures. The fact is that WordPress on mobile devices will load images 300 pixels wide or 700 pixels wide if the screen resolution is small, and if there are no thumbnails, it will load full-size images 1000 pixels wide. Think carefully before demolishing. I'm going to try the plugin

    "SrcSet Responsive Images for WordPress" to roll back.

For the next season, we probably need to switch to a dedicated server on DigitalOcean. I have never configured servers myself, so the process raises questions, but I hope I can do it. I promise to write how it is when the opportunity arises.

| 21 | 5 ratings, average: 5,00 out of 5)

Sooner or later you will have to pay for your negligence and wastefulness. Now I mean careless attitude to the order of site files and frivolous use of disk space. Perhaps many are familiar with the situation: when files were uploaded to the media library incorrectly, or they were not optimized, or the uploaded photos were not used in articles, or several identical photographs were uploaded, only one of which was used on the site. Such errors, due to carelessness or ignorance, lead to the fact that the site’s files begin to take up too much disk space.

I recently encountered a similar problem, which the Media Cleaner plugin helped me partially solve. I liked the plugin, that’s why I’m writing about it. The plugin is well written and does its job. However, I do not recommend using the plugin unless absolutely necessary - it still deletes files. In addition, I found some shortcomings in it, which I already wrote about to the author - little things.

As for my problem, after working on the “patient” for about a day, I managed to reduce the size of the uploads folder from 1200MB to 150MB, all by removing unnecessary images and optimizing the necessary ones. So you, too, be vigilant, do not let files take their course, unless you have free hosting.

Along with this article, I recommend getting acquainted with my plugin for creating thumbnails on the fly: Kama Thumbnail. With its help, you can create thumbnails of any size, only where they are needed, and simply disable the sizes that WordPress will “fit”.

About the Media Cleaner plugin

Media Cleaner - helps clean your uploads directory and media library.

What exactly does the plugin do? The plugin checks whether:

    the physical file is attached to the media library

    media file is used in recording

    media file is used in a custom post field

    media file used in WordPress post gallery

  • a retina media file (under a retina screen) has a regular file (file without @2x)

If there is a discrepancy with the specified checks, the plugin will mark the found files, which can later be deleted.

Which items need to be checked are set in the plugin settings.

Using the plugin

I will briefly describe how the plugin works:

After activating the plugin, go to the plugin settings (a menu will appear) and mark how we want to scan files:


Media Cleaner scan settings

Then go to the Media Files > Cleaner page and start scanning - the “Scan” button. After scanning, you need to refresh the page and you will see the files found:

Files required on the site must be marked as ignored: select the files with a checkmark and click the "Ignore" button. All other files that are not needed on the site can be moved to the trash: select unnecessary files with a checkmark and click “Delete” or click “Delete All”, then all found files will be moved to the trash.

Note: when moving to the trash, the plugin creates a new folder: /uploads/wpmc-trash and the deleted files are moved there. The year/month/file name structure is preserved. The MEDIA file type (files that are present in the media library) are removed from the media library and the physical files are moved to the "wpmc-trash" trash folder.

To completely delete files from the disk (from the server), you need to go to the trash, Trash section and use the buttons: "Delete" (will delete selected files) or "Empty Trash" (will delete all files in the trash).

In the same section, you can restore files by selecting. To do this, use the "Recover" (recovers selected files) and "Recover All" (restores all files in the recycle bin) buttons.

Note: deleted MEDIA files can only be recovered physically, i.e. the file will be restored to the uploads directory from which it was deleted, but it will no longer appear in the media library.

Please be aware before use. The plugin highlights files that are not found in the media library, or in the post content, or in custom post fields, or in galleries. These checks may not take into account other points, for example, if files uploaded to the media library or directly to the uploads directory are used. If you upload and use files non-standardly, for example, you upload pictures for sections to the media library and do not use them in posts, but these files are used in the template as pictures for sections. The plugin will consider such files unnecessary. Therefore, before deleting files from disk, make sure that the files selected for deletion are not used on the site.

Critical Assumption: If you use standard WordPress thumbnails, you set a post thumbnail and do not use an image in the post itself, then the plugin will consider such an image unused!

Note: after uninstallation (uninstallation), the plugin does not delete the cache folder (wpmc-trash) in the uploads directory. Therefore, this folder may need to be deleted manually.

Errors in the plugin

After removal, the plugin does not remove its options from the wp_options table. A common mistake of plugin authors... I corrected this point, you can download the corrected version from this link. I hope the author will hear my comment and correct this point in the next release.

Hello, friends! As you know, not everything that is stored in the folders of our website on hosting is really necessary. During the existence of the site, mountains of garbage accumulate in its “bins,” that is, many files unnecessary for the normal operation of the web resource. It could be anything - temporary or unused files, copies of documents or forgotten archives.

Everyone is well aware that it is necessary to periodically optimize databases or delete post revisions and spam. For those who do not want to do this manually, convenient ones have even been invented. For example, WP-Cleanup. But still, such cleaning does not allow you to look into all the corners and folders stored on the hosting and see all the garbage. Personally, during an excursion to hosting via FTP, I discovered on one of the sites two dozen zip archives that had not been used for a long time. Of course, I deleted them, but I thought maybe someone had the same story, so I decided to write this short article.

Where were the forgotten archives hidden?

Without further ado, I’ll immediately show you what and where I found. I must say that I rarely visit this blog of mine on the WordPress engine, and over the past year I have published only three articles on it. I don’t think it’s worth saying that I check his files on the hosting even less often. However, in the Uploads folder, next to the folders of images uploaded and sorted by month, I found 19 zip archives of templates and plugins. I installed them once during the process of various experiments to develop this blog. Moreover, most of these plugins and themes have not been used for a long time and have been removed. The full path to them looked like this: /public_html/wp-content/uploads.

Check to see if you have similar unnecessary files. By the way, it’s interesting to know this, since I didn’t find anything superfluous on my other sites. Although I can roughly guess why, but more on that later. In the meantime, connect to the hosting via FTP using the help and follow the path indicated above.

Of course, these archives do not take up much space, only about 9 MB. But if you actively develop the site over several years, then the size of this folder can be much larger. Anyway, why do we need garbage? We delete without a shadow of a doubt and thus free up space on the hosting. Those who don't take risks can make copies. Naturally, this did not affect my blog in any way.

Now everything looks neat, as it should be.

Freeing up space in the Uploads folder - deleting unnecessary pictures

By the way, as you know, image files are stored in the same Uploads folder on completely legal grounds. So, there is also a lot of garbage there. The fact is that WordPress automatically adds 2-3 copies of different sizes to the images inserted into posts. Therefore, unused files can be deleted and thereby significantly free up hosting disk space. We are no longer talking about 9 MB, but hundreds and even more. Believe me, unnecessary images take up a lot of space, especially if there are a large number of images. Here's what it looks like in one image.

As you can see, the required image weighs 28 KB, and two copies of it, which are completely useless, take up another 31 KB of space on the hosting, that is, the size increases by 2 times. So when the weight of your blog folder becomes critical, remember that it can be significantly reduced by simply deleting copies of image files. Just look carefully, sometimes different sizes are needed. For example, for miniatures.

You can use the special plugin DNUI Delete not used image to remove unnecessary images.

Where did the unnecessary files come from?

To be honest, I’m not particularly concerned about this issue, but I have some thoughts. Most likely, these archives end up in the Uploads folder when installing WordPress themes and plugins directly from the admin panel. I used this exact method before. The archive is uploaded to the hosting, its files are unpacked into the desired folder, and it itself remains in the download folder.

Although now, just for fun, I tried to install a couple of plugins through the WordPress admin panel - nothing new appeared. By the way, there weren’t that many junk files, since I installed a lot more plugins over the entire period. Maybe not all of them leave behind copies of the archives? In any case, now I upload files to the hosting via an FTP connection and do not notice anything like this.

What are your thoughts on this? I wonder if anyone else found something unnecessary in this folder? Share the results of your check in the comments.

Sooner or later, every website owner is faced with the issue of wasteful use of disk space. Thus, over the life of the site, a huge number of extra pictures and other media files may accumulate that were not used in articles, were uploaded incorrectly, or were simply lost due to improper optimization of the process of adding graphic content. All this leads to the fact that the already small disk space becomes even smaller. And, let's talk about how you can delete unused images in WordPress and what you need to do for this.

A little about deleting media files

It is probably impossible to completely automate the process of removing unnecessary images, but the popular WP Media Cleaner plugin can help partially solve this problem. It is well written, quite simple and clear to use, but we do not recommend that you use it unless absolutely necessary, because no matter how it deletes files.

Plugin characteristics

The WP Media Cleaner plugin is designed to clean your downloads directory as well as your media library. With its help, you can determine:

  • whether the media file is used in the recording;
  • whether the media file is used in the post gallery;
  • does the retina media file have a regular file;
  • whether the physical file is attached to the media library;

After checking according to the above parameters, the plugin will highlight for you a list of files that can be deleted.

Installing the plugin

In order to install our plugin, you need to go to the WordPress plugin directory using this link http://wordpress.org/support/plugin/wp-media-cleaner. Installation of the plugin is done as standard.

Also, you can install it directly from the administrative panel. To do this, go to the Plugins - Add New menu and enter the query “WP Media Cleaner” in the search bar.

Plugin setup

Despite the fact that the plugin does not have a Russian version, it is very convenient and easy to use, as it practically does not require additional settings.

After you have activated the plugin, go to the Settings menu - WP Media Cleaner and check the following items there:

Ready? Now go to the Media Files section - Media Cleaner and start scanning the files by clicking the Scan button. When the scanning is completed, in order to view the found files, all you have to do is refresh the page.

Now that you have a list of all files in front of you, you need to mark as ignored those files that you need for work, and then click Ignore. And the remaining files that are not needed on your site can be moved to the trash; to do this, mark all the files and click on Delete or Delete All.

Note that in this case, files are deleted only from the media library. The plugin creates a separate wpmc-trash folder in the directory into which all deleted files are physically moved. At the same time, the marking and date of placement of the file are preserved.

If you want to completely delete unnecessary pictures and media files, to do this, go to the Trash section of the Trash and click on the Delete button, if you want to delete selected files, or Empty Trash to delete all files.

If necessary, the recycle bin also has a file recovery function. The Recover and Recover All buttons are intended for this action.

Recovering deleted media files occurs only physically in the upload directory; they will not appear in the media library.

Errors in the plugin

After removal, the plugin does not remove its options from the wp_options table. A common mistake by plugin authors... I corrected this point, you can download the corrected version

When a website is just being created, at the initial stages the webmaster may be dismissive of the disk space on the hosting - after all, very little is currently occupied, about 10% of the space, and it will not be possible to reach the limit soon. And therefore, all sorts of unnecessary pictures are loaded (what if they come in handy), or of too high quality, unoptimized (just as beautiful!) or the same images (oops...).

However, once the site has been running for a year or two, its volume exceeds 90-95% of the allotted space on the hosting. And this mainly happens due to these unnecessary media files, which play absolutely no role, but take up a lot of space. And here there are two options - buy more expensive hosting, with more space, or delete these files. The second method is obviously more profitable. And in this article we will tell you how to make it also smart - after all, you can’t delete all unnecessary pictures manually. There is a WordPress plugin for this.

WP Media Cleaner

The WordPress plugin WP Media Cleaner allows you to remove all unnecessary media files from the site. It works simply - after installation and activation, the plugin will scan the entire wp-upload folder (where all images are stored) and identify those images that are not used in any of the posts.

To install this plugin for WordPress, you need to download it from the developer’s website or from the admin panel, entering its name in the search. Read about installing the plugin. After activation, the WP Media Cleaner sub-item will appear in the “Settings” item. Everything here is in English, and there is no Russian version, but there are only two settings, and both need to be enabled - just check two boxes for “Scan Media” and “Scan Filter”.

To use this plugin to remove unnecessary media files, now go to the “Media files” item and the Media Cleaner sub-item. Press the “Scan” button and scanning will begin, after which the page must be refreshed. And then you will see a list of all files that can be deleted.

Don't rush to delete. No matter how good this plugin for WordPress is, you cannot completely trust it. It is so automated that its operation must be checked by a live human eye. You should look through all the images found that are “unsuitable”, according to the plugin, and tick those that are really needed. Perhaps the plugin identified as “junk” those pictures that were used in some non-standard way in the post.

And only after you have looked through all the pictures yourself and highlighted the unnecessary ones, you can delete them by clicking on the “Delete” or “Delete All” button if you need to delete all files. But here this plugin for WordPress has protected us - all files are deleted to the trash. And if suddenly you did something wrong, you can restore them. And to delete media files completely, physically, you need to do this in the Trash section.

This plugin for WordPress has one big drawback. He considers thumbnail images as unnecessary, not attached to the post, if they are not used in the post itself, in the text. Therefore, be careful before deleting.