Can't delete a computer from the JSS.

not1984
New Contributor

So I tried manually deleting a computer which was no longer in use directly from the JSS but it somehow got "stuck" and now still appears in my computer list, though when I click on the entry I get the error message:

"The page you requested could not be found."

Any ideas how to get it cleared out? It still shows up in the "All Computers" count, as well.

Thanks!

7 REPLIES 7

MikeV-Holden
New Contributor

I have not seen this before, but I might try flushing the three *Computer . . log files. Flushing log files worked for me when I had a corrupt DMG file stuck in Casper Admin.

hcodfrie
Contributor

Hallo @not1984 strange that they won't get deleted, another way for deleting this is using the API.

JamfSupport has en api script to remove a computer by serialnumber Github
Good luck.

not1984
New Contributor

MikeV-Holden - Tried flushing log files already but no luck.

hcodfrie - Thanks for the script info. I'll give it a shot!

were_wulff
Valued Contributor II

Hi @not1984

If you haven't already, I'd recommend getting in touch with your Technical Account Manager; when this happens, it often times means there's a partial record somewhere in the database itself.

While we're not quite sure why it happens occasionally (there doesn't seem to be one underlying reason), what usually is the case is that the record gets removed from, in the case of a computer, the computers_denormalized table but not from the computers table, or vice versa.

Your Technical Account Manager can walk you through checking that in MySQL and manually removing it from the database if it turns out there are remnants left. The steps to do that are steps that can be pretty destructive if done incorrectly or on the wrong record(s), so they're not something I'd be comfortable posting here, but your Technical Account Manager will be able to look into it further, determine if this is what happened, and go from there.

You can get in touch with your Technical Account Manager either by giving Support a call, sending an e-mail to support@jamfsoftware.com, or by using the My Support section of JAMF Nation.

Thanks!
Amanda Wulff
JAMF Software Support

pblake
Contributor III

Have you restarted tomcat and MySQL? If so have you done a tables repair on MySQL. That should clear it up.

Chris_Hafner
Valued Contributor II

Yep, @amanda.wulff is 100% dead on. I've seen this before and had to clear them out. Your TAM will be familiar with the process. Take some notes as you'll get some great tips on how to check your DB. The table repair @pblake can do a number of things to help, but again, your TAM can teach you at least how to identify a problem. It's a great thing to know about, especially since it's a really good idea to check your tables before any upgrade.

suchyy
New Contributor

I thought I would reply after 6 years to thank hcodfrie for the script. Just had a mac that did not want to enroll in JAMF in any way. And I could not go to web UI to delete it, because JAMF could not load this computer. All the others loaded fine, but this one did not. So I used the script, deleted the mac by serial number, and then it enrolled fine.