How can I clean out that All Mail folder without removing the items in labels to get space in storage?
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
In order to remove all email that does not have a label assigned to it, search for any message that does not have a user assigned label. Select all messages that match this search, delete.
If you have email that are also in the inbox that you do not want removed then negate those.
Other options may include the following
has:nouserlabels -in:sent -in:chat -in:draft -in:inbox
It's not possible to clean out "All Mail folder" without removing messages in labels to get space because the messages are the same.