So, there I was, farming xp from my skeleton farm, getting myself set up with a set of enchanted tools, weapons, and armor, preparing for an excursion into the Nether. After ending up with a second helmet with Aqua Affinity and a bow with Flames (so useful in the Nether), faced with the prospect of punching another couple of hundred skeletons, I became weary. I still had two bows left to enchant! But I couldn't face it. I figured, what's the harm? I'll just give myself a little boost out of this tedious rut.

So I fired up console commands, not entirely sure what they did. I figured why not mess around with it? There's even a help page, this can't be so difficult. So I found the xp command:

xp <amount> [playername]
xp <amount>L [playername]

Hmm. Let's try this:

xp 10 mikeTheLiar

Oh. Well that only bumped me up about half a level. How about this?

xp 5000 mikeTheLiar

Sweet! 120 some odd experience levels! Let's get enchanting! Now fully equipped, I had a good deal of illicit xp that just didn't feel right keeping. How can I get rid of it?

xp -5000 mikeTheLiar

Hmm. "Can't give negative experience." Wait, wasn't there another command? I wonder what that does?

xp 5000L mikeTheLiar


I didn't want this. No, not like this, I didn't want to win like this! Anyway, so now I have several thousands levels of unwanted, ill-gotten, dirty experience, and on top of that, it's completely broken the game for me. I just didn't want to have to spend another 20 minutes farming, not render my farm obsolete (after all, I spent a good deal of time and effort building the thing).

How can I get rid of the evidence, without turning all of my materials into tools/weapons/armor, enchanting them all, and then throwing the result into a lava pit? Is there a command to get rid of it? Is there a tool like MCEdit that will get the job done? The only thing I can think of is killing myself, but I'm deep in the bowels of Hell right now, and I'd rather not have to lose all of my sweet, newly enchanted equipment. I could just wait until I get home, but then I'm losing all of the xp that I'm honestly earning killing Blazes and Ghasts right now.


6 Answers 6

/xp -5000000L mikeTheLiar

The xp command does not work with negative experience points, but works for negative levels, according to the Minecraft Wiki.

  • 7
    Alternatively, you've always got /kill :P
    – Unionhawk
    Jun 3, 2013 at 21:19
  • 1
    @Unionhawk Dying with that much XP would spawn enough XP orbs to make the world unusable from lag on most computers! Better to teleport oneself into the void. Jun 3, 2013 at 21:54
  • 1
    @SevenSidedDie or drop into the end Jun 3, 2013 at 22:44
  • 6
    @SevenSidedDie According to the Minecraft Wiki, only 100 points of experience will drop (source)
    – Unionhawk
    Jun 3, 2013 at 23:04
  • 1
    @Unionhawk Oh, that's not so bad then! Before that was capped it could be horrific. Jun 4, 2013 at 0:35

You can just /kill yourself.

You will probably want to learn how to use the /tp console command to go home so you can drop things off first though, to avoid losing equipment. (I always found the lack of built in warping to be unsatisfying.)

  • 1
    How is this an answer to this question? Jun 4, 2013 at 15:26
  • 2
    @Seven I believe the idea is to teleport home, store your equipment, kill yourself, grab your equipment, teleport back to your starting point. I'm not sure if this works from the Nether or not though. IMO it is a valid, albeit a little cumbersome, option. Jun 4, 2013 at 18:49
  • 4
    @mikeTheLiar Ah, that does make more sense. I've edited it so that the actual answer part is actually said rather than left implicit. Yeah, you can't /tp between dimensions, just within them, so "home" in the Nether is more like your main portal's coordinates. Jun 4, 2013 at 18:58
  • @Seven making it even more cumbersome, but still (pretty much) workable. Jun 4, 2013 at 19:01

Just type in /xp -xl (where x is the amount of levels you want to lose and l is a lowercase L)

Sorry for reviving a dead post, maybe this helps after 2 years?


What I did was /xp -(number of levels you want removed)L @p. I had given myself 2,000 levels for fun, didn't like it, and decided to experiment. This worked for me, so it may work for you, depending on what version your using. I didn't look at the updates. In case you're wondering what version I am currently using, I am using 1.8.9.


do /gamerule keepInventory true then kill yourself, YOU WON'T LOSE ANY STUFF but all the worthless xp is going to drain right out like water

  • keepInventory actually keeps levels, too.
    – Corsaka
    Jun 27, 2023 at 12:46

Do /xp set 0 levels

Or to get rid of points do /xp set 0 points

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .