Yeah, for the minimalist guy like me – the topic of this post is kind of odd. If you have been following my posts, you know that I like to keep things simple. However, it is very important that you do not go overboard here with “tiding things up” and deleting everything in your path. No, I am not asking you to become a hoarder or turning your SharePoint into one large garbage bin. I am not talking about content here (files and folders) at all, but rather “technical” elements and building blocks that make up SharePoint, like columns, content types, views, lists, and libraries. There are some very strong reasons why you should never delete any of them unless you want your SharePoint to break. So with this post, I would like to convey the explanation and reasons. Consider this blog an important Public Service Announcement. :-)
Deleting SharePoint elements carries potentially non-recoverable consequences
Below is a list of major SharePoint elements:
- List/Library Columns
- Site Columns
- Site Content Types
- Default Views
- Default Document Library
- Default Pages
- Default Site Collection
- Security Groups
Some should never be deleted. Some can be deleted if you are 100% sure that doing so won’t cause havoc. Let me explain.
There might be cases when you created a column at the list or library level and need to remove it. If you are 100% sure you no longer need it – go ahead and remove it.
However, if you are not sure whether you might need it in future again, you are better off hiding it. While the column is hidden from the users, it still exists out there in a list or library. Follow these steps to hide a column:
- Navigate to List or Library Settings via gear icon (if you are using modern experience). In classical, that option will be available on the web part ribbon
- Click on Advanced Settings
- Check the “Yes” radio button under Allow management of content types? Click OK at the bottom.
- What the previous step did was add a Content Type area in your list or library settings page. This is where you can hide the columns.
- Click on the Document Content Type
- Click on the column you want to hide. The default is Optional (visible).
- Change the radio button to Hidden. Click OK
- That’s all! While the column still exists and can be re-surfaced anytime if need be, it is hidden from the user when they fill in the metadata.
If you are setting up your columns as site columns (click here to learn more about the difference between list and site columns), you probably have seen a huge list of out of the box site columns that already exist. It might be tempting to “clean the house” and delete them. Please don’t! These columns are core columns used in certain out of the box web parts (contact lists, etc.) and content types. So just leave them there as-is. If you need to create a site column with a name that already taken by OOTB columns, just be creative and do a unique name.
Go to Gear Icon > Site Settings > Site Columns to see what I am talking about…
Site Content Types
Just like with Site Columns above, do not touch any out of the box site content types. For the same reasons as above.
Go to Gear Icon > Site Settings > Site Content Types to see what I am talking about…
Every list and library has default views built in. Custom List and Custom Library have All Items and All Documents views respectively, and some other web parts have additional views as well (i.e., Tasks).
I published a post on why you should never mess with a default view. So read that post, and it will explain why you should never delete or modify them. As described in that post, an alternative would be to create additional views and then make them default.
Default Document Library
A while back, I blogged about why you should not use a default document library on a site and instead must create your own.
If you follow the above tip, the temptation then is to delete the default document library that came with the site. Please don’t! Otherwise, you will end up in a situation, just like one of my loyal blog followers, who decided to “clean the house” and ran into an issue below. Let me explain.
Here is the crux of the issue: If you happen to use a modern page experience and decide to add a document to a page (via File Viewer Web Part)…
… by default, it will upload the document to a default document library that is created with the site (Documents). However, if you happen to delete that default document library from the site, you will no longer be able to upload the document via File Viewer Web Part!!!
Likewise, if you have Office 365 Group Site, default document library is connected to MS Teams/Channels. So while I still stand by the fact that you need to create new document libraries and not use a default one, you must refrain from deleting the default document library altogether!
Default Site Homepage
A page is a critical element of a SharePoint Site. A page is what displays content from your site. Every site has one at least. So resist the urge to delete all pages from a site! It is like you buy an iPhone® and break the display. Shall I say even more? Yes, you can create additional pages and you can make other pages homepages, but do not end up in a situation where you delete all of them from the Site Pages library. Otherwise, your site will fail to load properly.
Default Site Collection
While you can create and delete custom site collections – do not delete a default (root site collection)! If you are not sure what I am talking about – check out this post. If you delete a custom site collection you created – it just deletes that site collection and its content. If you delete a default site collection – it will break everything in your tenant (access to other site collections, search, OneDrive) essentially making your SharePoint unusable. You will need to either restore that default site collection from the recycle bin in the SharePoint Admin Center or provision a new one. You only need to do this if you totally messed up with customization of a default site collection and want to start from scratch.
Another element you should not delete often is a security group. As you provision new SharePoint sites and set up unique permissions, you will end up with extra three security groups for each site. True, this might mean lots of security groups if you have many sites with unique permissions, but if you delete a group, you can end up with unintended consequences. Let me clarify.
It is one thing if the security group you created is unique to the specific site. But what if you or someone else re-used the same group to set permissions on another site? Once deleted, you now mess up security/access on other sites, and users will get “Access denied” to the site now.
If you absolutely want to delete the group, check first the sites where it is used. I documented the steps in this post.
A better alternative would be to just remove the group from the site, without deleting it. When you remove groups from the site, they just lose association with the site, but otherwise, the groups still exist out there in the universe (site collection).
What about Content?
What about content, like files, folders, lists, libraries and complete sites? What if you just want to hide the stuff and not really delete it? That part is easy. All you have to do is just set permissions for that content (library or folder or the whole site). Everything in SharePoint is permission driven, so that means that if you don’t have access to something, you don’t even get to know about it or see it. I blogged about this concept here.